HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by compressedgas | Hacker News Reader
Full thread
compressedgas
·
Rust ran the loop at compile time.
View on HN
anandnair
·
Enabled compiler optimization for g++ and then the execution time went down to 0.00025, which made it slightly faster than Rust :)
lowcoderev
·
Is that a feature specific to Rust? Can you please share any references to their official docs citing this?
throwawaylinux
·
It's a feature of optimizing compilers for decades. OP just didn't compile the C++ code with optimizations enabled.
Reply on news.ycombinator.com