If you do want to test the differences between the range approach and the loop approach, something like:
auto sumtest4(Range)(Range range) @safe pure {
        return range.reduce!((a, b) => a + b);
}
is a more fair comparison. I get results within 15% of sumtest2 with this using dmd. I think with ldc this would be identical, but the version in homebrew is too old to compile this.

Reply via email to