D benchmarks

jerro a at a.com
Sun Mar 10 17:37:00 PDT 2013


>  - be open source, or at least source-available, so other 
> people can reproduce the results
>  - be *reasonably* self-contained, so that I don't have to 
> spend three hours setting up build dependencies
>  - be written mostly in D, I don't want to benchmark GCC
>  - work with DMD 2.061 or DMD 2.062
>  - run on Linux or OS X

You could also use pfft, then. This branch is the most up to date:

https://github.com/jerro/pfft/tree/use-gcc-udas

If you run:

./build
./build --tests

It will generate files test/test_float, test/test_double and 
test/test_real. You can choose compiler with --dc DMD|GDC|LDC. 
You can use -s flag on test/test_* executables to do a benchmark. 
Test executables  and build.d have --help option.

To make the comparison fair, it would probably be good to use 
--simd sse flag when building tests, because otherwise GDC and 
LDC versions will use AVX if run on a machine that supports it 
and DMD won't.

I also have test/benchmarks.d script that runs benchmarks and 
outputs charts, but I made no attempt to make it user friendly 
and you would need to read and modify its (a bit messy) code to 
use it - the only option it takes is the location of output 
files. It depends on Plot2kill.


More information about the Digitalmars-d mailing list