[fpc-devel] Comparison FPC 2.6.2 - Delphi 7

Florian Klaempfl florian at freepascal.org
Sat Mar 2 17:57:43 CET 2013


Am 02.03.2013 17:24, schrieb Marco van de Voort:
> In our previous episode, Florian Klaempfl said:
>>> I don't see why there would be more synchronization overhead than make?
>>
>> In a parallelized compiler symtables etc. might be shared and this might
>> require a lot of synchronization to prevent data corruption.
>> With make, the different units can be seperated much better by a human
>> than the compiler can do.
>
> Only if you want to avoid multiply used units to be only once in memory.
> IMHO if you are afraid of that, then don't do that :-)

Forking compilers on a by unit level instead of some meta level is 
typically slower because reading ppus takes a lot of time.

>
>> Not to mention the huge effort it would be to get the compiler
>> parallelized internally.
>
> As said the first step can be relatively simple. Get rid of globals some
> more, and then only the parts before compile() needs to be changed.

In theory, yes. In practice this is a huge effort. Just one example: 
inlining requires that the node tree of a procedure is copied. However, 
during copying the tree is annotated for proper copying. Bottom line: 
even if the compiler finished to compile a unit, the generated info is 
not read only.




More information about the fpc-devel mailing list