4 ms·
There might actually be a performance cost due to increased code size (by way of increased amount of icache misses).
by robryk 12y ago
There might actually be a performance cost due to increased code size (by way of increased amount of icache misses).
- jules 12y agoThe implementers of MLton, an ML compiler that does C++ style monomorphization, found that after optimization the code size is actually smaller with monomorphization. That's because the specialized code is simpler and can be further optimized. So even if you have multiple specialized copies, the total is still smaller. See here: http://mlton.org/Performance http://mlton.org/Performance