On 14.09.2011 1:18, Vladimir Panteleev wrote:
Hi, thanks for your hard work!

On Wed, 14 Sep 2011 00:04:08 +0300, Dmitry Olshansky
<[email protected]> wrote:

https://github.com/downloads/blackwhale/FReD/FReD.zip

Doesn't seem to compile on the latest DMD, due to switch case fallthrough.


Arrrrgh! On serious note it is fixed in some recent pull request, but that was hopelessly late for getting in this release.

Goodies include popular regex-dna benchmark, by my measures we should
be at least #3 among single threaded solutions.

This is awesome, but if it's not a secret, who are the first two, and
how far behind is FReD? Does this regard regular or compile-time regex?

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.

Though I used 64bit VM linux box, on win32 sadly it runs out of memory
on the same machine (false pointers?).

If I'll find time to port my memory debugger to D2 before someone else
figures it out, I'll have a look at this.

Thanks, by my cut and paste tests shows the problem is caused by allocating large buffers in replace loop. Probably a better solution to this is alternative replace function that doesn't allocate on each call but uses a OutputRange.

--
Dmitry Olshansky

Reply via email to