D parser in tango or phobos

Benji Smith dlanguage at benjismith.net
Wed Sep 10 17:05:47 PDT 2008


bearophile wrote:
> Benji Smith:
>> A good example of its usage is in the Regex implementation, in the .NET 
>> standard library. It builds a custom function, with raw GOTO opcodes and 
>> everything, based on the regex string passed into the constructor at 
>> runtime. Consequently, the .NET regex engine is very very efficient.
> 
> I don't know how mono Regex are done, but they are quite slow compared to most of the other ones:
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=all

Well I'll be damned. You're right.

I just wrote a few tests, performing identical regex operations in both 
Java and C#, to compare their running times.

In every test, the C# regex was always between 3 and 7 times slower.

Weird. I wonder why.

--benji



More information about the Digitalmars-d mailing list