Better HN
topnewbestaskshowjobs
Log inSign up

rames

78 karma · joined Oct 7, 2011 (15y ago) · 7 submissions

Submissions

1.

GNU grep vs git grep vs jrep(coreperf.com ↗)

3 points · by rames · 12y ago · discuss

2.

More grep vs rejit benchmarks(coreperf.com ↗)

5 points · by rames · 13y ago · discuss

comment 13y ago · link · parent

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

comment 13y ago · link · parent

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.

comment 13y ago · link · parent

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 !

6.

Rejit - prototype of a non-backtracking, just-in-time, SIMD-able regexp compiler(coreperf.com ↗)

81 points · by rames · 13y ago · 18 comments

comment 15y ago · link · parent

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.