www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - regex-dna speed

reply mm <mm_member pathlink.com> writes:
I was looking through the speed comparison results and noticed that compilers
like C C++ and D all kinda fail the regex-dna bench, while fortan perl and
python have no problems with it. 

http://shootout.alioth.debian.org/benchmark.php?test=regexdna&lang=all

Why this enormous difference?
(sorry if this is a really n00b question)
Feb 09 2006
parent Dave <Dave_member pathlink.com> writes:
In article <dsglr5$2o1q$1 digitaldaemon.com>, mm says...
I was looking through the speed comparison results and noticed that compilers
like C C++ and D all kinda fail the regex-dna bench, while fortan perl and
python have no problems with it. 

http://shootout.alioth.debian.org/benchmark.php?test=regexdna&lang=all

Why this enormous difference?
(sorry if this is a really n00b question)

Basically I think it comes down to the implementations of the regex library substitution functions for the scripting languages.. Or in the case of Fortran, 261 lines of hand-optimized 'custom' code.
Feb 09 2006