Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-07

An idea in my head to improve compilation speed

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

leledumbo

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 .

Reply by email

Graeme Geldenhuys
to leledumbo
leledumbo wrote
I see however one of compilation bottleneck in FPC: The -Fu switch. FPC linearly searched for units in all given -Fu + a standard location.

Did you actually profile FPC to see if that really is the bottleneck, or are you just taking an educated guess?
Implementing a change like that, simply because it was a guess makes no sense.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email