NYCPHP Meetup

NYPHP.org

[nycphp-talk] testing a theory

Brian Dailey support at dailytechnology.net
Wed Feb 7 11:31:05 EST 2007


The easiest way (I would think) is to run them both in a loop. Run 
option 1 1000 times, and record the start time and end time, output the 
total time it took to run it. Do the same with option 2 and compare the 
results.

- Brian

Aaron Fischer wrote:
> How would one test something like this?  Testing for performance is 
> something I would like to start doing but I don't know where/how to start.
> 
> -Aaron
> 
> On Feb 7, 2007, at 11:05 AM, tedd wrote:
> 
>> No offense meant, but when I have a question like that, I test it and 
>> find out. Why ask the list for something you could test yourself?
>>
>> tedd
>>
>> At 6:39 PM -0500 2/6/07, Adrian Noland wrote:
>>> Hi, I have a quick (and probably silly) question. Is there performance
>>> difference between the following two snippets. Does it make a
>>> difference if there are hundreds+ of lines?
>>>
>>> <?php
>>> $content = "this is the start of a bunch of lines";
>>> $content .= "another line";
>>> $content .= "yet another";
>>> echo $content;
>>> ?>
>>>
>>> vs.
>>>
>>> <?php
>>> echo "this is the start of a bunch of lines";
>>> echo "another line";
>>> echo "yet another";
>>> ?>
>>>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 



More information about the talk mailing list