[fpc-devel] Pointer cache for fast class/pointer access.
skybuck2000 at hotmail.com
Tue Jan 3 15:26:20 CET 2012
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.
Or as somebody else mentioned: object vs class.
I could give a full test program which illustrates it ;) (It's kinda big
though, a generator).
But if you know anything about assembler you should be able to figure that
stuff out yourself ?!? ;) :)
But perhaps you more of a "parser/text guy" and less of an "assembly/binary
guy" ? ;)
Anyway what remains is the question: what's different between object and
class or Tobject and object when it comes to capabilities.
Also the slightly different syntax is kinda a shame... this would make it a
little bit difficult to flip/flop between different "object models".
Flexible software is nice for when requirements change so it would be nice
if changing object model would be easy to do to a certain degree ;)
MyClass := TMyClass.Create;
^ Why this difference ? It makes it less flexible to flip/flop :(
More information about the fpc-devel