[fpc-devel] for-in-index loop

Michael Van Canneyt michael at freepascal.org
Sat Jan 26 13:18:19 CET 2013



On Sat, 26 Jan 2013, Alexander Klenin wrote:

> On Sat, Jan 26, 2013 at 10:50 PM, Sven Barth
> <pascaldragon at googlemail.com> wrote:
>>> Generics was implemented without my knowledge. I only found out when
>>> suddenly
>>> the classes unit had been changed to use them. After a horrible
>>> discussion, this was reversed, because of the drop in speed you got when
>>> using generics.
>>
>> Ah! So that is where those ifdefs in classes come from :) I always
>> wondered...
>>
> Is the drop still present/essential? Perhaps optimizer is now good
> enough to drop those ifdefs?

No.

You never can replace a direct pointer assignment a:=B with a call to Move()
and expect the same speed.

Michael.



More information about the fpc-devel mailing list