Re:Reducing Rust Incremental Compilation Times on macOS
by chongli on Sunday April 18, 2021 @11:15AM
(#26853172)
It isn’t even zero runtime cost abstraction though. Monomorphizing all generic functions increases code size. Increased code size causes more instruction cache pressure which may actually slow things down, depending on the application. I could imagine if you’ve got some very large functions that are called on a wide variety of objects then every call could blow out the Icache and kill the hit rate.
[ Parent
| on HN ]
Re:Reducing Rust Incremental Compilation Times on macOS
by ben0x539 on Sunday April 18, 2021 @12:51PM
(#26854070)
It's an abstraction over writing out the monomorphized version by hand. Zero-cost doesn't mean using the abstraction gets you the fastest possible implementation of whatever you're doing.