Sorry to add more salt to the open wound, but i am with Steve Rude on this one. when it comes to drupal, we should hang onto every chance to improve performance. even small things like changing upper case TRUE to lowercase. as some have mentioned: in a single request drupal might not have enough such cases to make a difference. but when your site receives a lot of traffic, something as small as this might make a difference.
<br><br><div><span class="gmail_quote">On 8/27/07, <b class="gmail_sendername">Steve Rude</b> &lt;<a href="mailto:steve@achieveinternet.com">steve@achieveinternet.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  
  

<div bgcolor="#ffffff" text="#000000">
Fair enough.&nbsp; The only things I would disagree with is that 1) Just
because there are only 2500 in the source code doesn&#39;t mean that they
don&#39;t get looped over quite a bit, and 2) my Mac Pro Quad Xeon with 4GB
of memory behaves all that much different than the Quad Xeon 4GB
webservers that we and our clients have deployed :) <br>
<br>
The original question came out of the coder module which recommended
these changes for better &quot;performance&quot;, and I looked into it, and
several other projects recommend using lower case for these constants,
as well as a couple bugs on the <a href="http://php.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">php.net</a> bug list.&nbsp; I actually prefer
writing with upper case, so the only point was if there was any real
world gain.<br>
<br>
Here are the links I had found:<br>
<br>
<a href="http://bugs.php.net/bug.php?id=27286&amp;edit=1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://bugs.php.net/bug.php?id=27286&amp;edit=1</a><br>
<a href="http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+%28draft%29?showComments=false#PHPCodingStandard%28draft%29-BooleansandtheNULLValue" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft)?showComments=false#PHPCodingStandard%28draft%29-BooleansandtheNULLValue</a><span class="q"><br>
<a href="http://drupal.org/node/121388" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://drupal.org/node/121388</a><br></span>
<a href="http://ilia.ws/archives/12-PHP-Optimization-Tricks.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ilia.ws/archives/12-PHP-Optimization-Tricks.html</a><br>
<br>
<br>
Other PHP software that use lower case true, false and null standard:<br>
<br>
PEAR Standard - <a href="http://pear.php.net/manual/en/standards.naming.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://pear.php.net/manual/en/standards.naming.php</a><br>
Joomla - <a href="http://help.joomla.org/content/view/826/125/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://help.joomla.org/content/view/826/125/</a><br>
Mambo - <a href="http://www.source.mambo-foundation.org/content/view/117/69/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.source.mambo-foundation.org/content/view/117/69/</a><br>
EZ Publish -
<a href="http://ez.no/ezpublish/documentation/development/standards/php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ez.no/ezpublish/documentation/development/standards/php</a><br>
Flyspray - <a href="http://flyspray.org/internal:conventions#constant_names" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://flyspray.org/internal:conventions#constant_names</a><br>
OSCommerce -
<a href="http://svn.oscommerce.com/fisheye/browse/osCommerce/tags/oscommerce-2.2rc1/STANDARD?r=1662" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://svn.oscommerce.com/fisheye/browse/osCommerce/tags/oscommerce-2.2rc1/STANDARD?r=1662
</a><br>
phpMyAdmin - <a href="http://phpmyadmin.sourceforge.net/documentation/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://phpmyadmin.sourceforge.net/documentation/</a><br>
Zen Cart -
<a href="http://www.zen-cart.com/wiki/index.php/Developers_Standards#Naming_Conventions" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.zen-cart.com/wiki/index.php/Developers_Standards#Naming_Conventions
</a><br>
phpBB - <a href="http://area51.phpbb.com/docs/coding-guidelines.html#optimizing" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://area51.phpbb.com/docs/coding-guidelines.html#optimizing</a><br>

<br>
<br>
And finally, thank you Peter for updating the docs to clarify.<br>
<br>
Sorry to be a performance nut, but I can&#39;t help it.&nbsp; I think a lot of
us are a little OCD sometimes :D<br>
<br>
Steve Rude<div><span class="e" id="q_114a9b67268b1417_3"><br>
<br>
Konstantin Käfer wrote:
<blockquote type="cite"><br>
  <blockquote type="cite">1326ms vs. 1382ms is 60ms, and when normal
page load times are somewhere around 200ms, it makes a substantial
difference.
    <br>
  </blockquote>
  <br>
Even if we disregard the fact that microtime tests have a big stddev,
your test is not very convincing: You are using these constants several
hundred thousand times whereas Drupal only has 2500+ in its *entire*
source code. And of that source code, only a fraction gets to
execution. I&#39;d estimate the number of constants that are actually
executed on a Drupal page view to about 500, and even that is probably
too high. If you extrapolate your results (60ms for 100000), you&#39;ll get
0.3 msecs. Besides, a real world server behaves quite different from a
desktop machine, especially in such edge cases.
  <br>
  <br>
Konstantin<br>
</blockquote>
<br>
<br>
</span></div><div><span class="q">-- <br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Steve Rude
+ Lead Developer</font><br>
<b><font color="#ff3300" face="Verdana, Arial, Helvetica, sans-serif" size="2">Achieve<font color="#666666">Internet</font></font></b></span><a><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">(800)
618-8777 x 202</font><br>
<br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">http://www.achieveinternet.com</font></a></div>
</div>

</blockquote></div><br><br clear="all"><br>-- <br>Oleg Terenchuk <br>Web Manager / Developer<br>Phone: 917 - 306 - 5653