views:

50

answers:

3

I'm running my own (albeit, basic) benchmarks in a linux-based sandbox. However, I'd love to find a per-function or per-task performance / benchmark reference or utility for comparison.

Does this exist?

Of course I've done my own fair diligence / searching and have so far come up empty handed..

(I'm primarily interested in information relevant to PHP 5.3)

Thanks very much! :)

+2  A: 

Googling brings up the two I know best:

they don't do function benchmarks, though, they mostly just compare language constructs. I know at least one good site that also tests file I/O operations and the like, but I forgot the URL. I really need a central link repository :)

Update: This looks interesting, can't take a deeper look right now but there seems to be a number of interesting tests.

Pekka
The PHP Benchmark looks to be a fantastic resource, a great find Pekka.
Mark Tomlin
Reading the results on the page, 'echo vs. print' function test and reading the results. (Now this could be because I'm very tired right now, and just not parsing the results correctly.) 100% echo ' vs. 107% print ', Print is 7% Slower then Echo. 128% echo 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa' vs. 252% print 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa', Print is ~197% Slower then Echo. And yet, The quote: "The one small thing to notice is that when using a comma to separate items whilst using the echo function, items run slightly faster." is false as comma apears to be twice as slow as concating the string.
Mark Tomlin
@Mark intersting. Those are real-time tests and thus subject to the server's fluctuation, while the quote seems to be static. Reloading changes the results notably... Which can be seen as problematic, but also is realistic. One would have to run 100 loops to get average values I guess.
Pekka
Wow, very nice. Thanks! :)Oddly, I didn't come over these in my searches. I've been looking for over a week. Most I could find were articles discussing tests for single, specific issues.
Lorren Biffin
@Pekka, haha, so I'm not crazy! Thank you for the follow up!
Mark Tomlin
+2  A: 

You can use a profiler to evaluate which function calls are more costly.

XDebug can also provide log files that you can later load into KCacheGrind to get a nice tree output of what time was spent where in your code.

andre
XDebug is great! Thanks. :)
Lorren Biffin
A: 

It doesn't contain any specific times, but it does have the Big-O for a number of array_* functions.

http://stackoverflow.com/questions/2473989/list-of-big-o-for-php-functions

Kendall Hopkins