3 ms·
> A debug build of Rust code is often like 40x slower or so than a release build. Hmm ok, yeah. C++ with heavy stdlib (or generally: template) usage has the sa
by flohofwoe 4y ago
> A debug build of Rust code is often like 40x slower or so than a release build.
Hmm ok, yeah. C++ with heavy stdlib (or generally: template) usage has the same problem (although in my experience it's more like 10..20x slower), but OTH C's debug and release build performance is usually much closer. I guess it's a side effect of generics that they heavily rely on the compiler optimization passes to turn the resulting 'generic mess' into something closer to what a human would write (e.g. remove all the redundant and dead code resulting from 'template resolution').