I've just done a quick game between pwahs03 and clonewarriors and it gets quite slow once around 1000 ants are on the map. Profiling showed:
In Call Tree:
- knapp 90% in
GameWorld.tick()
- 30% in
SpacePartitioning.antObjectsInsideCircle
- 22% in
SpacePartitioning.antMessagesInsideCircle
- rest in pwahs AI and other methods
Sorted by selftime per method:
- 26% in
Parameters.shortestVectorOnTorusTo
- 14% in
SpacePartitioning.TsInsideCircle
- 10% in
Vector.subtract
- 10% in
pwahs03.HillAI.contained (checks if given Snapshot is contained in a given list)
- 8% in
shortestDifferenceOnTorus (which does not more than:
return shortestVectorOnTorusTo(Vector.subtract(p1,p2));)
- 8% in
Parameters.distance(Vector, Vector)
- 4% in
Vector.add
which already gives 80% of the runtime.
Any ideas, comments?
I've just done a quick game between pwahs03 and clonewarriors and it gets quite slow once around 1000 ants are on the map. Profiling showed:
In Call Tree:
GameWorld.tick()SpacePartitioning.antObjectsInsideCircleSpacePartitioning.antMessagesInsideCircleSorted by selftime per method:
Parameters.shortestVectorOnTorusToSpacePartitioning.TsInsideCircleVector.subtractpwahs03.HillAI.contained(checks if given Snapshot is contained in a given list)shortestDifferenceOnTorus(which does not more than:return shortestVectorOnTorusTo(Vector.subtract(p1,p2));)Parameters.distance(Vector, Vector)Vector.addwhich already gives 80% of the runtime.
Any ideas, comments?