Difference between revisions of "Profiling"

From OTBWiki
Jump to: navigation, search
 
Line 1: Line 1:
 
This page compiles some profiling conclusions and tips:
 
This page compiles some profiling conclusions and tips:
  
*Method GetSize() is
+
===Method GetSize()===
  
 
**Avoid:
 
**Avoid:

Revision as of 10:05, 26 May 2010

This page compiles some profiling conclusions and tips:

Method GetSize()

    • Avoid:

for (int i=0;i<v.GetSize();++i) { }

    • Prefer:

const unsigned int size = v.GetSize(); for (int i=0;i<size;++i) { }