@pcwalton @GraphenePunk seems like generating code for an NFA would be just as easy, if not more so. Just a bunch of labels and jumps.
-
-
-
Replying to @ssylvan
@ssylvan@graphenepunk That'd be an interesting experiment. I don't know of any benchmarks against a good JIT on non-pathological regexes.1 reply 0 retweets 0 likes -
Replying to @pcwalton
@pcwalton@GraphenePunk "pathological" regexes aren't as uncommon as you think. When it blows up, it goes nuclear, why risk that?2 replies 0 retweets 0 likes -
Replying to @ssylvan
@ssylvan@graphenepunk In my experience they're uncommon, and why sacrifice performance of the common case to handle uncommon cases?2 replies 0 retweets 0 likes -
Replying to @pcwalton
@pcwalton@GraphenePunk in most cases buffer overruns don't happen, so why have bounds check? I'd trade a tiny perf. loss for a robust alg.3 replies 0 retweets 0 likes -
Replying to @ssylvan
@ssylvan@graphenepunk ATM it's *not* a tiny perf loss. re2 is extremely slow compared to PCRE.2 replies 0 retweets 0 likes -
Replying to @pcwalton
@pcwalton@GraphenePunk re2 doesn't JIT. Try http://code.google.com/p/regen/ ? Will have startup overhead. For small haystack, use fallback maybe2 replies 0 retweets 0 likes -
Replying to @ssylvan
@ssylvan@graphenepunk Sounds cool, I should check that engine out :)1 reply 0 retweets 0 likes -
Replying to @pcwalton
@pcwalton@GraphenePunk also, pcre is often extremely slow compared to re2 (for reasonable regexes). Scroll down http://swtch.com/~rsc/regexp/regexp3.html …2 replies 0 retweets 0 likes
@ssylvan @graphenepunk I think that's before PCRE added the JIT. Look at benchmarks of Go regexes versus PCRE on the benchmarks game
-
-
Replying to @pcwalton
@pcwalton@GraphenePunk ah, you have to compare jit vs jit obviously. DFA seems like it would be easier to jit than backtracking.0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.