Hacker News new | ask | show | jobs
by sevengraff 2335 days ago
Interesting, got a blog that goes into more detail?
1 comments

We wrote this paper about it for CGO: https://research.fb.com/publications/optimizing-function-pla....

But the paper actually describes a significantly more sophisticated heuristic. My initial implementation simply used the number of perf samples divided by the size of the function, which helps make sure you’re getting the most out of your I-TLB. It worked shockingly well for its simplicity.