Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
compressedgas
· 3y ago · 0 comments
Rust ran the loop at compile time.
Comments
[–]
anandnair
3y ago
Enabled compiler optimization for g++ and then the execution time went down to 0.00025, which made it slightly faster than Rust :)
[–]
lowcoderev
3y ago
Is that a feature specific to Rust? Can you please share any references to their official docs citing this?
[–]
throwawaylinux
3y ago
It's a feature of optimizing compilers for decades. OP just didn't compile the C++ code with optimizations enabled.