======== ======= ================================================== Run ms Speed Flags ======== ======= ================================================== 157.5 2.02x -d:release 113.7 1.46x -d:danger 158.0 2.03x -d:release --floatChecks:off 123.7 1.59x -d:release --overflowChecks:off 145.1 1.86x -d:release --boundChecks:off 112.8 1.45x -d:release --overflowChecks:off --boundChecks:off 77.9 1x -d:danger --cc:clang 197.8 2.54x -d:release --gc:arc 177.9 2.28x -d:danger --gc:arc 86.8 1.11x -d:danger --cc:clang --gc:arc ======== ======= ==================================================
Conclusion: --gc:arc does this no favors. Integer checks for all the loops are what slows -d:release down. LLVM beats the pants off gcc for this benchmark, which might explain Rust's performance.