[fpc-devel] Suggestion: reference counted objects

Boian Mitov mitov at mitov.com
Wed Sep 24 01:14:50 CEST 2014


This conversation is really getting nowhere, but you are right for one 
thing, when more virtual functions are used, which is becoming fairly common 
(At least for destructors etc.), the VMT tends to stay in the cache, and 
since VMT functions are smaller than full address functions the execution 
tends to be slightly faster on average :-) . So it seems you have figured 
out this common misconception properly. Now you only need to learn enough to 
realize some other misconceptions you have, but you already have a lot of 
information from a lot of people in the thread, so it will probably not be 
long :-) .

With best regards,
Boian Mitov

-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------
-----Original Message----- 
From: Peter Popov
Sent: Tuesday, September 23, 2014 3:54 PM
To: FPC developers' list
Subject: Re: [fpc-devel] Suggestion: reference counted objects

Please, explain. The fundamental problem with virtual functions is pointer
running. If your VMT reference is in the cache, sure, calling is fast. If
object 1 execs a virtual to get object 2 who executes a virtual to get
object 3 ... etc than you have a major problem. What are you going to do,
keep all VMTs for all objects in the cache?
_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel 




More information about the fpc-devel mailing list