View Single Post
  #5  
Old 08-06-2011, 12:10 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Sp_lit View Post
PHP Code:
  for(0this.listofitems.size(); ++) 
This is being a little bit picky and won't really make any difference in this particular instance but it's more efficient to avoid using .size(); within an array that doesn't change value in this type of loop.

With this type of loop where you're accessing 'i' it would take less script time to do:

PHP Code:
temp.this.listofitems.size();
for(
0temp.s++) 
This is albeit something that would be worthwhile when it comes to looping through much larger arrays, the reason being is that the .size(); function would be processed on every part of the loop, which takes longer with larger arrays.
Reply With Quote