On Wednesday, 11 November 2015 at 14:26:32 UTC, Andrea Fontana wrote:
Did you try rdmd -O -noboundscheck -release yourscript.d ?

I just did. It improves speed from 17.127s to 14.831s. Nice, but nowhere near gdc/ldc level.

You should try using appender!string rather than concatenate (http://dlang.org/phobos/std_array.html#.Appender) using capacity (http://dlang.org/phobos/std_array.html#.Appender.capacity) to improve performace.

You should also switch from for to foreach.

Thanks for the above 2 tips.

Reply via email to