note 47500 added to language.types.boolean

From: Date: Thu, 18 Nov 2004 10:06:46 +0000
Subject: note 47500 added to language.types.boolean
Groups: php.notes 
Request: Send a blank email to php-notes+get-80691@lists.php.net to get a copy of this message
If you're *really* concerned with squeezing the most speed out of your code as possible (such as in a highly recursive section), you want to set your boolean style variables to 0 for false and 1 for true. I've been doing benchmarks and I've found that these are the fastest. Of course, these operations are so fast that you should only be concerned about the difference when you're iterating over a million or more of these operations. (We're talking .02 seconds difference with a million iterations on my home machine.) ---- Manual Page -- http://www.php.net/manual/en/language.types.boolean.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47500 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47500&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47500&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47500&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47500&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47500&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47500&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47500&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80691) next »