HNHacker News
TopNewBestAskShowJobs

rames

78 karma · joined October 7, 2011

submissionscomments
rames··on Rejit - prototype of a non-backtracking, just-in-time, SIMD-able regexp compiler
Note that I didn't chose the worst case for grep. But probably not the best either. First thing I tried just now:

$ time grep -R "yoyo\|regexp" linux-3.10.6 > /dev/null real 0m2.138s user 0m1.875s sys 0m0.252s

$ time jrep -R "yoyo|regexp" linux-3.10.6 > /dev/null real 0m0.411s user 0m0.135s sys 0m0.270s

rames··on Rejit - prototype of a non-backtracking, just-in-time, SIMD-able regexp compiler
Anything working yet ?

SSE4.2 is not mandatory. Rejit works without it as well (SSE support detected dynamically), it just gives excellent performance with a relatively simple implementation. Support for earlier versions of SSE can easily be added.

I'll try to add libpcre to the benchmarks when I get some time.

rames··on Rejit - prototype of a non-backtracking, just-in-time, SIMD-able regexp compiler
Support for backreferences can be added without making the whole engine backtracking. See more detailed comments at: https://plus.google.com/114767693573247408592/posts/ZeUHc7ro...

Edit: So we can keep the best of both worlds !

rames··on Ask HN: Separate code and comments?
I don't like the idea of excluding all comments from the code. However excluding useless or local comments from a repository can be legitimate.

Two potential solutions:

1) Use a regexp to match your comments and trim your code before committing. That shouldn't be too hard, and is pretty efficient since you only need to care about it before submitting your code. If there are existing comments that should stay in the code, use a specific markup for your comments.

2) Another idea could be to maintain a stgit patch integrating all the comments. This requires a bit of process though.