PHP bench - cycles

Mar 13, 2010 21:40

Hello everyone! This entry is for web developers or those who are playing around with PHP.

Every programmer is evolving in phases. Let's says that last phase is trying to make code as much efficient as possible. Part of this process is benching compiler to define what is most efficient solution. So here we go with some results.

Benching cycles under PHP 5.3.x )

php

Leave a comment

Comments 2

yamavu March 15 2010, 00:25:47 UTC
geez, that looked like fun. I should really try to boost into PHP sometime, but it doesn't really feel clean to me at all.

However thanks for the tips on the foreach loop, I'll try to remember when I might need it. Gladly some arrays in other languages cache their size internally so the call won't be Θ(n)=n²
However it's clean style.

Reply

lweek March 17 2010, 22:57:41 UTC
I see, but if not PHP then what? Unfortunately there isn't much better solution. Java is a mess and also quite slow not metion problems with hosting and .NET is just NO as long as everything Microsoft is expensive as hell and not so safe. :-)

Reply


Leave a comment

Up