Compiling in std.regex affecting performance

Denis Shelomovskij verylonglogin.reg at gmail.com
Sat Jan 7 05:57:33 PST 2012


07.01.2012 5:12, Andrej Mitrovic пишет:
> Oooh I've just realized something, the *compilation* calls are what's
> destroying the performance. I was using "dmd test.d&&  test.exe"
> instead of just "test.exe" and this would generate a new exe which
> screwed up the results.
>
> So regex has nothing to do with it. Still, some linkers perform better:
>
> $ dmd -c test.obj
> $ link test.obj
>
> Average is ~700usecs. But with ulink:
> $ ulink test.obj
>
> Average is ~380 usecs. Interesting!

No regex call:   ~350 usecs, size: ~800 KiB
With regex call: ~540 usecs (i.e. +54%), size: ~1000 KiB (i.e. +25%)
Deviation is about 10 usecs when repeatedly launching from a console.

Compiler: dmd 2.057 -O -noboundscheck -release, CPU: E6850, OS: Windows 
XP SP3 32bit.

So what is the explanation of 54% speed decrease?


More information about the Digitalmars-d mailing list