HN2
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
andrewvc
on Nov 19, 2014
|
parent
|
context
|
favorite
| on:
Node.js in Flame Graphs
What I'm saying is that the pipe (or) "|" is a cheap way to combine regexps. It has its limitations, but its better than an O(n) search through an array. The regexp parser can create an NFA that is far more optimized.
spion
on Nov 19, 2014
[–]
In JS, "far more" isn't quite that dramatically far as in other dynamic language runtimes. See
http://jsperf.com/regex-list-vs-full
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: