Re: If the first four characters are "0000", then do {} - timing tests
| From: | Daniel Brown | Date: | Tue, 26 Jan 2010 22:22:53 +0000 |
| Subject: | Re: If the first four characters are "0000", then do {} - timing tests | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301499@lists.php.net to get a copy of this message | ||
On Tue, Jan 26, 2010 at 17:17, Daevid Vincent <daevid@daevid.com> wrote:
>
> Well allow me to retort... :)
>
> Your test was for 5 measly array elements.
>
> Just for S&G I tried it with the strpos one too and modified your test
> slightly to handle bigger arrays...
>
[snip=code]
>
> I ran out of memory with more than 1M array elements.
>
> But yes, I will concede that the speed difference is minimal, even at 1M
> elements. Although the docs are right that strpos is about 2x as fast...
Right. I removed the note you posted to that effect a few moments
ago because you didn't explain what was being done. If you'll
resubmit it with a snippet of the conversation (or even just, "in
discussions about benchmarks with this vs. that vs. those, blah, blah,
blah....") it'll stay up. It's a good test result, and worthwhile for
those building large-scale systems. Kudos to you, Doctor! ;-P
>> Just an FYI before you start worshipping pasta, Mr. Vincent. ;-P
>
> By the way, I loved your book "Da Vinci Code" ;-p
I was always too busy writing it to read it.
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Looking for hosting or dedicated servers? Ask me how we can fit your budget!