Port a benchmark to D?

Timon Gehr timon.gehr at gmx.ch
Sat Jun 4 09:54:46 PDT 2011


Daniel Gibson wrote:
> What was your time for D without disabling the GC? Probably 40-50s?
> This certainly is a big improvement, I didn't think the GC slows it down
> that much.
>
> What'd be really interesting is the benchmark with a D-style
> implementation of the code (if I understood correctly the current
> versions are more or less direct translations of the C++ code to D).
>
> Cheers,
> - Daniel

Without disabling the GC, it runs through in 38.2s.

The D-style implementation would probably be about the same, bearophile has
already replaced std::map/std::set with associative arrays and std::list with
dynamic arrays. The algorithm cannot take advantage of Eg. array slicing. It
solves a graph problem. I will try to tune the code some more.

Timon


More information about the Digitalmars-d mailing list