n9jlo / bwta

Automatically exported from code.google.com/p/bwta
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Increase Analyze performance #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is an issue many people have mentioned in several places (channel, BWAPI 
issues tracker, etc).

Some tips to increase an application's performance:
 - Use inline/intrinsic functions.
 - Use basic types(char,bool,int) instead of stl containers, string, etc.
 - Use "non-safe" intrinsic functions (memcpy, memcmp, etc).
 - Optimize project settings for speed, use fast floating point model, etc.
 - Use __fastcall where applicable.
 - Move the most accessed structure members to (or near) the top.

Advanced performance:
 - Use unsigned aligned types (on a 32-bit system "unsigned __int32" and on a 64-bit system "unsigned __int64").
 - Unfold application loops. Instead of "for (int i = 0; i < 2; ++i) someval[i]++;" you would write "someval[0]++; someval[1]++; someval[2]++;"
 - Use one big function instead of several smaller ones.

These are just suggestions I thought of at the top of my head, there are 
probably some others.

Original issue reported on code.google.com by AHeinerm on 24 Jan 2011 at 11:10