Closed Subuday closed 3 months ago
Yes, avoids inlining a function. Outlining the slow path keeps code for the hot path close together in memory (or more easily inline-able). This improves perf by not thrashing the instruction cache (I-cache). Similar techniques are used by mutexes (tryLock then block in slow func).
Hey, I wonder, what's the reason of using noinline? What goal do you want to achive? Just prevent compiler optimisation of inlining function? If yes, why do we prevent?