Kieran P skrev:
Ok, I ran this using the same exe and gmon file.
gprof -q --min-count=10 glob2 ~/gmon.out > ~/profile.txt
then bzipped. It can be found here:
http://dl.sv.nongnu.org/releases/glob2/profile.txt.tar.bz2
Does this help you ? (come onto IRC so we can talk there)
I think so... (I'm on IRC now, by the way, but can't find you).
At both of the two most frequent invocation sites of Sprite::getW(),
getH() is called right afterwards.
So it's cache- or method-lookup-related, I suspect.
Could you try one thing?
In libgag/include/SDLGraphicContext.h, at the bottom, the Sprite class
is defined; try to remove 'virtual' from the declarations:
//! Return the width of index frame of the sprite
virtual int getW(int index);
//! Return the height of index frame of the sprite
virtual int getH(int index);
With this change we avoid the virtual method lookup. It still seems to
compile (it did for me), so apparently nobody has extended the class anyway.
Then try measuring again... it may not have any effect, but it's worth a
try.
Oh, and just checking: The binary glob2 you ran and the one present when
you executed gprof, these were identical, right? No recompiling in between?
/Erik
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel