[fpc-devel] performance tests: reference counted vs non-reference counted

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Nov 16 12:11:02 CET 2007


On 16/11/2007, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
>
> Why are the iteration differences that big? 566 vs 935?
> There seems to be a problem with how you test/measure.

No idea??  They seem to fluctuate after each run, but the overall
result (which tests are faster) are always constant.  Have a look at
the code, if there is a better way of testing this. The code is pretty
simple.  Just loop and create 10,000 objects in each loop.


graemeg at graemeg:Demo$ ./performancetest
2255 iterations in 5 seconds (no reference counting with MyBaseObject)
1857 iterations in 5 seconds (no reference counting)
2904 iterations in 5 seconds (reference counting)
318 iterations in 5 seconds (reference counting with MyBaseObject)

... waited 10 seconds and then ran it again...

graemeg at graemeg:Demo$ ./performancetest
2243 iterations in 5 seconds (no reference counting with MyBaseObject)
1890 iterations in 5 seconds (no reference counting)
2950 iterations in 5 seconds (reference counting)
416 iterations in 5 seconds (reference counting with MyBaseObject)




Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list