On 9/14/11 7:51 AM, Dmitry Olshansky wrote:
On 14.09.2011 2:44, Andrei Alexandrescu wrote:
On 9/13/11 4:37 PM, Dmitry Olshansky wrote:
OK in this particular benchmark, we are slighlty behind Google inc. :)
Namely RE2 and irregex.
On my machine RE2 is ~5 sec while FReD does the job in ~7sec.
As for irregex, ... uhm-oh I haven't actually tested it (failed to just
compile) but it beats RE2 in this test by some ~30%.
I'm judging by this page, RE2 I mentioned is "C++ GNU g++ #2" but with
OpenMP declarations stripped:
http://shootout.alioth.debian.org/u32/performance.php?test=regexdna
Damn looks like we could be #4... these things change too fast :(
Anyway, the rest of competition is not even close, and I still haven't
spent all of my tricks.
Sounds great! I advise you to invest effort in reducing the 25% handicap
to <1%.
Yes, sir! :)
As regexen have a fairly standardized interface, speed is the
most impactful differentiatior people look at.
Well in this particular benchmark there is little I can do, some small
scale optimizations and such, I expect no more then 10%.
The bigger picture is that our best bet here is static regex, the
competitors use some aggressive JIT so it's a fair play. I actually
received pull request this morning do just that (thx, Martin) though dmd
uses so much memory it's not for mortals yet:
I had 2G of ram + some 600mb of swap - fail on 3rd pattern of 9
+ 2 Gb of swap - 6 out of 9
Come on, it's a sport!
+ 4 Gb of swap and after few restless minutes I got it working
Fresh timings:
FReD C-T 3.4 sec
FReD R-T 6.6 sec
RE2 4.8 sec
V8 JS 3.7 sec
Look ma, we are on top! :)
So, by the end of day, D does kick ass, even though it's a bit of
Pyrrhic victory.
---
Dmitry Olshansky
Great, thanks. Could you please email me privately some more information
about the benchmark and your test code? I'm considering using this in my
upcoming talk at the Strange Loop conference.
Thanks again,
Andrei
Andrei