I've run wormux in 1024x768 at 30fps. The figures below vary a bit
depending on resolution and framerate. I don't list functions below 4%
of total time (check 2nd column). Here are 2 scenarios:

1) A 5 minutes game on map funkyisland (the clouds animation don't seem
to add to the computation)
24344    18.3780  Member::ApplyMovement(member_mvt const&,
std::vector<c_junction, std::allocator<c_junction> >&)
10065     7.5983  Tile::CheckEmptyTiles()
6772      5.1124  std::_Rb_tree<std::string, std::pair<std::string
const, std::vector<Vector2<float>, std::allocator<Vector2<float> > > >,
std::_Select1st<std::pair<std::string const, std::vector<Vector2<float>,
std::allocator<Vector2<float> > > > >, std::less<std::string>,
std::allocator<std::pair<std::string const, std::vector<Vector2<float>,
std::allocator<Vector2<float> > > > > >::find(std::string const&)
5767      4.3537  std::_Rb_tree<std::string, std::pair<std::string
const, member_mvt>, std::_Select1st<std::pair<std::string const,
member_mvt> >, std::less<std::string>,
std::allocator<std::pair<std::string const, member_mvt> >
>::find(std::string const&)
5520      4.1672  Sprite::Calculate_Rotation_Offset(Surface const&)
5489      4.1438  Tile::GetAlpha(Vector2<int> const&) const


2) Same but map is banquise (thus with water and many wind particles):
29742    15.7259  Water::Draw()
21282    11.2527  Member::ApplyMovement(member_mvt const&,
std::vector<c_junction, std::allocator<c_junction> >&)
12087     6.3909  Tile::GetAlpha(Vector2<int> const&) const
7184      3.7985  .plt
6182      3.2687  std::_Rb_tree<std::string, std::pair<std::string
const, std::vector<Vector2<float>, std::allocator<Vector2<float> > > >,
std::_Select1st<std::pair<std::string const, std::vector<Vector2<float>,
std::allocator<Vector2<float> > > > >, std::less<std::string>,
std::allocator<std::pair<std::string const, std::vector<Vector2<float>,
std::allocator<Vector2<float> > > > > >::find(std::string const&)

One can see that water animation consumes the most CPU time, then member
rotation is 2nd. Their figures varies within +/-5% but the order is
still kept. Tile::GetAlpha probably appears because the alpha reads are
not batched together, but I don't think it's important at this point anyway.

_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à