Updated D Benchmarks

bearophile bearophileHUGS at lycos.com
Sun Mar 15 05:00:13 PDT 2009


Robert Clipsham, the pages are indeed improved a lot. Thank you for your work.

>with all benchmarks limited to 256mb memory usage<

- Some benchmarks of the Shootout site will probably need more than 256 mb of RAM.


> The only request I believe I've missed (correct me if I'm wrong!) is a C 
> or C++ reference. This was planned for inclusion, but I couldn't come to 
> a conclusion on which compiler to include and whether to use C or C++.
> Before you suggest having multiple references, I would rather only have 
> one reference otherwise it becomes more general language benchmarks 
> rather than D.

The purpose of the reference is to see how far are the D implementations from "a good enough" compilation. In most cases this means that you can time a C or C++ version (in some benchmarks other languages are faster than C/C++, but for the moment we can ignore this).
So my suggest is just to take a look at the Shootout site, where you take your code from (D implementations aren't present anymore, but there are kept elsewhere if you need them), and use the C version every time it's the faster between the C and C++ ones, and use the C++ version in the other cases (I give preference to the C version because they are generally simpler).

Few notes:
- I may also offer you few more benchmarks not present in the Shootout site.
- Now I suggest you to add more benchmarks.
- Did you strip the executable produced by ldc and gdc? (If you do it, or you don't do it, then add a note that says it).
- What is the trouble of nbody with gdc?
- when you give an URL into an email or post I suggest you to not put a full stop "." at the end, otherwise the person that reads the post may have to delete it manually later from the URL. If you really want to add a full stop or a closing parentheses, put a space before it, like this: (http://www.digitalmars.com/webnews/ ).
- The compilation times are too much small, so such values are probably noisy. So you may add another value: you can compile all the programs and take the total time required (this isn't the sum of the single compilation times). Otherwise you may need a different benchmark, a much longer D program, that you can compile with all three compilers.
- From your results it seems ldc needs more memory to run the programs. The LDC team may take a look at this.

Bye,
bearophile



More information about the Digitalmars-d mailing list