View Single Post
  #37  
Old 09-14-2009, 07:59 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by fowlplay4 View Post
Specifying findNPC every time appears to take twice as long (in my benchmark anyway) compared to variable and direct methods.
According to Stefan, it's similar to how it works when you check boolean values.

This:

PHP Code:
function onCreated() {
  
temp.bool true;
  if (
bool == true) {
    
//Stuff
  
}

Is supposed to take longer to process than this:

PHP Code:
function onCreated() {
  
temp.bool true;
  if (bool) {
    
//Stuff
  
}

Reply With Quote