What are good heuristics for inlining functions?
Considering that you're trying solely to optimize for speed, what are good heuristics for deciding whether to inline a function or not? Obviously code size should be important, but are there any other factors typically used when (say) gcc or icc is determining whether to inline a function call? Has there been any significant academic work in the area? Wikipedia has a few paragraphs about this, with some links at the bottom: In addition to memory size and cache issues, another consideration is register pressure . From the compiler's point of view "the added variables from the inlined procedure