note 68196 added to language.operators.comparison
| From: | gamephreakATremovethisgmailDOTcom at osu1 dot php dot net | Date: | Mon, 17 Jul 2006 23:28:29 +0000 |
| Subject: | note 68196 added to language.operators.comparison | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114862@lists.php.net to get a copy of this message | ||
"Identical to" is faster compared to "equals to." I ran a test script that
compared various combinations of strings and integers over a 10000x loop. Sample results:
'foo' v. 'foo' eq: 0.00274
'foo' v. 'foo' id: 0.001671
42 v. 42 eq: 0.00171
42 v. 42 id: 0.001436
'foo' v. 'bar' eq: 0.002589
'foo' v. 'bar' id: 0.001658
42 v. 43 eq: 0.001719
42 v. 43 id: 0.001419
'42' v. 42 eq: 0.00223
'42' v. 42 id: 0.001392
'42' v. 43 eq: 0.002281
'42' v. 43 id: 0.001389
----
Server IP: 216.194.113.175
Probable Submitter: 24.93.109.115
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php
Edit -- http://master.php.net/note/edit/68196
Del: integrated -- http://master.php.net/note/delete/68196/integrated
Del: useless -- http://master.php.net/note/delete/68196/useless
Del: bad code -- http://master.php.net/note/delete/68196/bad+code
Del: spam -- http://master.php.net/note/delete/68196/spam
Del: non-english -- http://master.php.net/note/delete/68196/non-english
Del: in docs -- http://master.php.net/note/delete/68196/in+docs
Del: other reasons-- http://master.php.net/note/delete/68196
Reject -- http://master.php.net/note/reject/68196
Search -- http://master.php.net/manage/user-notes.php