Code profiling opinions?

Well, I'm not experienced at looking at code profiling statistics, so I'm not really sure what is considered good or bad in profiling...

I am using SDL2 & Boost.

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 45.00      0.09     0.09     1224     0.07     0.11  Client_State::Render()
 12.50      0.12     0.03   200387     0.00     0.00  LTexture::render(int, int, SDL_Rect*, float)
  5.00      0.12     0.01  2931420     0.00     0.00  __gnu_cxx::__normal_iterator<tile*, std::vector<tile, std::allocator<tile> > >::operator*() const
  5.00      0.14     0.01  2774248     0.00     0.00  __gnu_cxx::__normal_iterator<tile*, std::vector<tile, std::allocator<tile> > >::base() const
  5.00      0.14     0.01   689641     0.00     0.00  tile::getX()
  5.00      0.15     0.01   315591     0.00     0.00  Collision(SDL_Rect, SDL_Rect)
  5.00      0.17     0.01    54610     0.00     0.00  boost::date_time::int_adapter<long long>::int_adapter(long long)
  5.00      0.17     0.01     7097     0.00     0.00  boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, (boost::date_time::time_resolutions)5, 1000000ll, (unsigned short)6, int>::to_tick_count(int, int, int, long long)
  5.00      0.18     0.01        1    10.00   159.57  SDL_main
  5.00      0.20     0.01                             WinMain@16
  2.50      0.20     0.01                             LTexture::setAlpha(unsigned char)


sorry if this is not considered c++ related :'(
There's no such thing as "good" or "bad". There's "meets time requirements" and "doesn't meet time requirements". You don't need a profiler to figure out which one applies to your program; you simple time a given operation and compare it to how long you'd like it to take.
The point of a profiler is finding where the program is spending its time, to effectively focus optimation efforts.
http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html#SEC5

Here, the bulk of the time is spent in Client_State::Render() (few calls, but high time per call).

LTexture::render(int, int, SDL_Rect*, float) too takes a fair amount of time.

If tile::getX() is a simple return some_pod_value ; kind of function, it can be profitably inlined.
Topic archived. No new replies allowed.