IsSentinel() performance question

b0nz0
2007-05-06
2013-06-04
  • b0nz0

    b0nz0 - 2007-05-06

    Hi all,

    I'm trying some Kyra stuff for a tile-based RPG project (still pre-pre-pre-alpha stage! ;) ).
    I'm using Dev-C++, Kyra 2.0.7 (the one shipping with the DevPak for Dev-C++), Windows XP w/1GB of memory.

    I'm in some high level optimization for the render loop and I used the GNU profiler shipped with the mingw environment to watch relevant execution times for the code. Surprisingly enough on top of my statistics I have:

    Each sample counts as 0.01 seconds.
      %   cumulative   self              self     total          
    time   seconds   seconds    calls   s/call   s/call  name   
    15.04      2.02     2.02                             GlInsideNode<KrImNode*>::IsSentinel() const
      9.75      3.33     1.31                             KrImNode::ZDepth()
      8.79      4.51     1.18                             KrImageTree::AddNode(KrImNode*, KrImNode*)
      5.21      5.21     0.70                             GlInsideNodeIt<KrImNode*>::Done()

    so the method which occupies most of my cpu time is GlInsideNode<KrImNode*>::IsSentinel().
    As far as I can understand from the Kyra code it has just a {return !pointer;} body, which just should not take so much time to be executed!!! (I have much worse loops in my render rountines! ;) ).

    Can you figure out what is happening? Maybe the method is called so many times that even its small body is relevant in execution times? Or I should upgrade to Kyra 2.1 to see very different profier statistics? Or just I should not consider as good the gprofiler output when talking about Kyra?

    Thank you in advance,

    b0nz0

     
    • Lee Thomason

      Lee Thomason - 2007-05-06

      b0nz0 --

      Profiling is a dark art - optimization settings? Memory bandwidth? Sampling moires?

      But it's not worth worrying about. Kyra is plenty fast enough to render any tile based RPG you throw at it. Get that game working - Kyra can handle it. :)

      lee

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks