[fpc-pascal] An idea in my head to improve compilation speed

leledumbo leledumbo_cool at yahoo.co.id
Thu Jul 28 06:45:55 CEST 2011

I've just read an forum post somewhere comparing compilation speed of FPC and
Delphi when building MSEide. In that post, FPC is 9 times slower than Delphi
7. I don't have Delphi so I don't know how it can be very fast. I see
however one of compilation bottleneck in FPC: The -Fu switch. FPC linearly
searched for units in all given -Fu + a standard location. As many projects
with hundreds of units, the searching can be slow. I'm not sure whether FPC
caches the location of each unit ever found (so another uses would simply
re-use it instead of re-searching) or not, but I have an idea coming from
Lazarus code tools. Lazarus indexes FPC sources for its autocompletion
feature, so I guess FPC could also do the same. But this time, it indexes
only unit location instead of all identifiers inside it.

I'm not a compiler master nor experts, and this idea just comes across my
mind unexpectedly. Feel free to analyze or comment, I know there would be
many things to consider before it can be implemented (like how the index
should grouped based on target platform).

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/An-idea-in-my-head-to-improve-compilation-speed-tp4641278p4641278.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

More information about the fpc-pascal mailing list