[fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

Florian Klämpfl florian at freepascal.org
Sun Oct 28 09:33:30 CET 2018


Am 28.10.2018 um 02:11 schrieb Ben Grasset:
> 
> There's also a number of things that would specifically help the build-time performance of the compiler itself that I've
> noticed, such as there being many, many, many, one-liner functions and procedures that should almost certainly be marked
> as inline but currently are not. 

... because FPC can auto inline if needed. However, the current autoinline heuristics which is pretty conservative
(read: inlines only very small subroutines), has exactly two effects: it makes the compiler executable bigger and
slower. A few bytes bigger would be ok, but slower is not acceptable, right? I can tell you also why it is slower: the
compiler is memory throughput limited, so everything which increases the memory footprint is bad. While (auto)inlining
helps very much for "normal" programs and benchmarks, for the compiler it is not a good solution.

The only thing I consider useful in this direction is to work on improving the auto inline heuristics by maybe adding
two methods: for pure size and for speed, if the program is not memory throughput limited.



More information about the fpc-devel mailing list