path tracing benchmark
bearophile
bearophileHUGS at lycos.com
Sun Aug 7 18:27:18 PDT 2011
Trass3r:
> I ported smallpt to D some time ago and now that I've working versions of
> LDC2 and GDC2 I did a quick comparison:
I have converted to D many of the commonly found benchmarks, this is my version:
http://codepad.org/ZbmSfseY
If I compile it with with LDC1 with Link Time Optimization + Interning:
ldc -O3 -release -inline -output-bc smallpt2_d.d
opt -std-compile-opts smallpt2_d.bc > smallpt2_do.bc
llvm-ld -native -ltango-base-ldc -ltango-user-ldc -ldl -lm -lpthread -internalize-public-api-list=_Dmain -o=smallpt2_do smallpt2_do.bc
I produce a binary that's faster than the C++ version (22.7 seconds instead of 29 seconds).
Bye,
bearophile
More information about the Digitalmars-d
mailing list