[fpc-devel] Pointer cache for fast class/pointer access.

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Jan 5 12:05:49 CET 2012


Florian Klämpfl schrieb:
> Am 04.01.2012 19:24, schrieb Hans-Peter Diettrich:
>> Skybuck Flying schrieb:
>>>
>>> -----Original Message----- From: Hans-Peter Diettrich
>>> Sent: Tuesday, January 03, 2012 14:56
>>> To: FPC developers' list
>>> Subject: Re: [fpc-devel] Pointer cache for fast class/pointer access.
>>>
>>> Skybuck Flying schrieb:
>>>
>>>> vValue := mDepth1.mDepth2.mDepth3.mValue;
>>> "
>>> You can implement such a funny hierarchy in any language. So what?
>>> "
>>>
>>> For the performance of the line of code above it matters if TObject or
>>> Object is used.
>> Ah, now I understand what you mean. Nonetheless I don't see sane reasons
>> for creating such (deeply nested) structures in real life code - records
>> would serve the same (demonstrated) purpose.
> 
> If one really suffers from cache misses, then

one should consider a better layout of the data structures.

In your example a class hierarchy would be better suited, where no 
additional pointers are required to access base class members.

DoDi




More information about the fpc-devel mailing list