Regex performance

Ali Çehreli acehreli at yahoo.com
Mon Mar 26 15:05:33 PDT 2012


On 03/26/2012 02:41 PM, Dmitry Olshansky wrote:
 > On 27.03.2012 0:27, James Blewitt wrote:
 >> Hello everybody,
 >>
 >> Thanks once again for the interest in my problem. I have posted the
 >> details and source code that recreates (at least for me) the poor
 >> performance.
 >> I didn't know how to post the code to the forum, so I posted it to my
 >> blog instead (see post update):
 >>
 >> http://jblewitt.com/blog/?p=462
 >>
 >> Again, if I'm doing something stupid in my code (which is possible) then
 >> I apologise in advance.
 >
 > No need to apologize, but you are using 2.054, which is unfashionable :)
 > More importantly 2.054 contains old and rusty version of std.regex, the
 > new version was included in 2.057+.
 > BTW The current release is 2.058.
 >
 >>
 >> I'll take a look at the ctRegex as soon as I can.
 >>
 >
 > Yup, just update compiler+phobos.
 >
 >> Regards,
 >> James
 >
 >

My unofficial results comparing 2.056 to 2.058 on 64 bits:

shakespeare.txt, 2.056 -> 1868 msecs
shakespeare.txt, 2.058 ->  632 msecs

data.csv, 2.056 -> 51953 msecs
data.csv, 2.058 ->  1329 msecs

That last line is pretty impressive. :)

Ali



More information about the Digitalmars-d mailing list