Is dmd fast?

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 23 11:03:14 PDT 2016


On Thursday, 23 June 2016 at 17:39:45 UTC, Daniel Kozak wrote:
>
> [kozzi at samuel ~]$ dmd -defaultlib=libphobos2.so a.d
> [kozzi at samuel ~]$ time for t in {1..1000}; do ./a; done > 
> /dev/null
>
> real    0m7.187s
> user    0m4.470s
> sys    0m0.943s
>
> [kozzi at samuel ~]$ dmd -defaultlib=libphobos2.a a.d
> [kozzi at samuel ~]$ time for t in {1..1000}; do ./a; done > 
> /dev/null
>
> real    0m1.716s
> user    0m0.047s
> sys    0m0.323s

yep, you are right. on my tests .a took 0.695 total, but .so took 
4.908 total.

not really matters for one-shot scripts, but... i didn't knew 
that the difference is SO huge. thank you for pointing that.


More information about the Digitalmars-d mailing list