> ldc -release -O5 -mcpu=native test.d && ./test
reduce!(min,max) = 16 secs, 745 ms, 280 μs, and 1 hnsec
fold.minMax = 13 secs, 756 ms, 979 μs, and 4 hnsecs
minmaxElement = 14 secs, 179 ms, 390 μs, and 1 hnsec
DMD with only 10K instead of 100K elements:
> dmd -release -noboundscheck -inline -O test.d && ./test
reduce!(min,max) = 24 secs, 714 ms, 778 μs, and 2 hnsecs
minmaxElement = 1 sec, 265 ms, 808 μs, and 2 hnsecs
> ldc -release -O5 -mcpu=native test.d && ./test
reduce!(min,max) = 25 secs, 262 ms, 508 μs, and 9 hnsecs
fold.minMax = 15 secs, 106 ms, 617 μs, and 7 hnsecs
minmaxElement = 14 secs, 807 ms, 857 μs, and 1 hnsec
./test 55.18s user 0.00s system 99% cpu 55.186 total
DMD with only 10K instead of 100K elements:
> dmd -release -noboundscheck -inline -O test.d && ./test
reduce!(min,max) = 11 secs, 117 ms, 859 μs, and 3 hnsecs
fold.minMax = 24 secs, 107 ms, 105 μs, and 9 hnsecs
minmaxElement = 1 sec, 278 ms, 684 μs, and 4 hnsecs
> ldc -release -O3 test.d && ./test
reduce!(min,max) = 1 sec, 297 ms, 376 μs, and 6 hnsecs
minmaxElement = 13 secs, 311 ms, 938 μs, and 1 hnsec
minmaxElementNoMap = 1 sec, 288 ms, 746 μs, and 8 hnsecs
./test 18.04s user 0.02s system 99% cpu 18.067 total
> dmd -release -noboundscheck -inline -O test.d && ./test
reduce!(min,max) = 25 secs, 143 ms, 399 μs, and 1 hnsec
minmaxElement = 12 secs, 611 ms, 64 μs, and 7 hnsecs
minmaxElementNoMap = 12 secs, 588 ms, 154 μs, and 5 hnsecs
./test 50.35s user 0.00s system 99% cpu 50.351 total