3 ms·
Why would inlining too much increase cache misses? I've never heard that.
by lambdanator 12y ago
Why would inlining too much increase cache misses? I've never heard that.
- hawkice 12y agoAnything that increases executable size might/will cause it to make more fetches into memory, if only to get all those bonus instructions. I'd say this is a pretty minor effect in every scenario I've dealt with. Haskell, in particular, lets you inline very easily (and so many people do if performance is important), and I've only heard of one time where that had a negative consequence, and that was mostly about a missing optimization that you had to fix in a non-removing-inlining kind of way (it had to do with polymorphic strings leading to code inlined at every single string literal, which is extremely silly).
- TheLoneWolfling 12y agoYep. Note, however, that, as a special case, inlining of a function only called in one place "should" always be faster.