3 ms·
Is monomorphization truly 0-cost? I thought it's basically a different flavor of optimizing inliner (somewhat more under user control) which has a similar trade
by vlovich123 5y ago
Is monomorphization truly 0-cost? I thought it's basically a different flavor of optimizing inliner (somewhat more under user control) which has a similar tradeoff curve between whether it's better to stamp out a monomorphized version of a function or if it's better to operate on more opaque type signatures.
- avgcorrection 5y agoIt’s zero-cost compared to manually copy-pasting code (manual monomorphization). Zero-cost means that it doesn’t cost more than whatever you would do if you didn’t have the feature.