my first D program (and benchmark against perl)

perlancar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 12 08:10:52 PST 2015


On Thursday, 12 November 2015 at 12:49:55 UTC, Daniel Kozak wrote:
> dmd -O -release -inline -boundscheck=off  asciitable.d
>
> real	0m1.463s
> user	0m1.453s
> sys	0m0.003s
>
>
> ldc2 -singleobj -release -O3 -boundscheck=off asciitable.d
>
> real	0m0.945s
> user	0m0.940s
> sys	0m0.000s
>
> gdc -O3 -finline -frelease -fno-bounds-check -o asciitable 
> asciitable.d
>
> real	0m0.618s
> user	0m0.613s
> sys	0m0.000s
>
>
> perl:
>
> real	0m14.198s
> user	0m14.170s
> sys	0m0.000s

Nice! Seems like I can get a further 100% improvement in speed 
from the last version (so a total of ~8x speedup from my original 
D version). Now I wonder how C would fare...



More information about the Digitalmars-d-learn mailing list