On Tuesday, 28 October 2014 at 13:30:05 UTC, Nordlöw wrote:
On Tuesday, 28 October 2014 at 11:51:42 UTC, MattCoder wrote:
I forgot to say that I'm compiling with DMD without any
compiler hints/optimizations.
Try compiling with DMD flag
-release
and perhaps also
-release -noboundscheck
to get relevant results.
DMD is currently not that good at inlining range primitives.
Interesting!
With -release the second version still faster but only by 10%.
Now with: -release -noboundscheck they are equal and sometimes
your version is slightly faster by ~3 milliseconds.
Matheus.