News for hackers. Stuff that matters.
Re:Linux with “memory folios”: a 7% performance boost when c... by jeffbee on Tuesday June 15, 2021 @01:26PM (#27518579)
Results will vary for small vs. large programs. I've seen catastrophic space optimizations that out-of-lined very small methods like std::vector::at, because the call was one or two bytes smaller than the inline. Lambdas are inlined even with Os because they don't have names or multiple callers and can't be made smaller by out-of-lining. A functor class, or any function with multiple call sites could trigger the problems with Os.
Re:Linux with “memory folios”: a 7% performance boost when c... by oriolid on Tuesday June 15, 2021 @01:52PM (#27518952)
Ok, I'm not continuing with this. Just note that I didn't write that -Os would be always or even usually faster. I could try to come up with an example where -O3 produces a huge loop preamble for loop that's iterated once or just generates enough cache misses to be overall slower, but I don't care enough.