Difference between revisions of "Profiling"

From OTBWiki
Jump to: navigation, search
m (Reverted edits by Ulofyvy (Talk); changed back to last version by Manuel.grizonnet)
Line 1: Line 1:
 
This page compiles some profiling conclusions and tips:
 
This page compiles some profiling conclusions and tips:
  
>===Method GetSize()===
+
===Method GetSize()===
  
 
*Avoid:
 
*Avoid:
''for (int i=0;i<v.GetSize();++i) {}''
+
''for (int i=0;i<v.GetSize();++i) {}''
  
 
*Prefer:
 
*Prefer:
 
''const unsigned int size = v.GetSize();
 
''const unsigned int size = v.GetSize();
for (int i=0;i&lt;size;++i) {}''
+
for (int i=0;i<size;++i) {}''
 
+
----
+
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
+
----
+
>=[http://ezoralihiku.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
+
----
+
 
+
----
+
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
+
----
+
=[http://iduqyjolima.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
+
----
+
=[http://iduqyjolima.co.cc CLICK HERE]=
+
----
+
</div>
+
 
+
=[http://ezoralihiku.co.cc CLICK HERE]=
+
----
+
</div>
+

Revision as of 18:27, 19 November 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) {}