[fpc-devel] Patch for rtl/inc/rtti.inc

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Sep 14 17:19:45 CEST 2008


On 14 Sep 2008, at 15:11, Daniƫl Mantione wrote:

> Op Sun, 14 Sep 2008, schreef Jonas Maebe:
>
>> I don't think it's a good idea to start manually adding loop  
>> induction variables to many routines in the rtl. It makes the code  
>> less maintainable, and at one point the compilation process itself  
>> will/should do that by itself.
>
> This patch should get applied. It's debatable wether additions are  
> hard to maintain than multiplications

Having one or two variables that need manual updating in a loop vs  
none at all reduces maintainability. It's one of the reasons why  
people use for-loops rather than while-loops.

> and it may take years before the compiler can do that optimization.  
> That doesn't mean we should optimize anything manually, but fpc_copy  
> is definately speed critical code for things like widestrings.

Almost every loop in the RTL is criticial for at least one language  
feature which is heavily used by a certain category of programs.


Jonas


More information about the fpc-devel mailing list