my first D program (and benchmark against perl)
perlancar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Nov 12 04:13:10 PST 2015
On Wednesday, 11 November 2015 at 14:20:51 UTC, Rikki Cattermole
wrote:
> I turned it into mostly using large allocations, instead of
> small ones.
> Although I'd recommend using Appender instead of my custom
> functions for this.
>
> Oh and for me, I got it at 2 secs, 513 ms, 397 μs, and 5
> hnsecs. Unoptimized, using dmd.
> When release mode is enabled on dmd: 1 sec, 550 ms, 838 μs, and
> 9 hnsecs. So significant improvement even with dmds awful
> optimizer.
Hi Rikki,
Thanks. With your version, I've managed to be ~4x faster:
dmd : 0m1.588s
dmd (release): 0m1.010s
gdc : 0m2.093s
ldc : 0m1.594s
Perl version : 0m11.391s
So, I'm satisfied enough with the speed for now. Turns out dmd is
not always slower.
More information about the Digitalmars-d-learn
mailing list