Ruby vs PHP performance
izumi.plan99.net
izumi.plan99.net
def merge(a, b)
c = []
c << (a[0] > b[0] ? b.shift : a.shift) until a.empty? || b.empty?
return c+a+b
end
def mergesort(a)
a.size <= 1 ? a : merge(mergesort(a.slice!(0,a.size/2)),mergesort(a))
end
Language Power > Language Speed >def realsort():
t1 = datetime.datetime.now()
for x in range(3000):
numbers[:].sort()
t2 = datetime.datetime.now()
print t2-t1
>realsort()
>0:00:00.128081http://shootout.alioth.debian.org/gp4/benchmark.php?test=bin...
It would appear to me that most of this is driven by prejudice and stems back to people like what they know, where they feel comfortable, and upstarts that think they know better (the new kids on the block) have less bias, less invested and are evangelists of the new because it's cool and they have a chance of caving out a bit of respect if they can attain expert status in that new field where they would have had no chance with the old fashioned.
I like php, simply because i find it easy to grasp, almost intuitive, but most importantly is the community, who have within the documentation left their own solutions and many tips are gained from this for me, along with a few other resources I can normally find most things in PHP, thousands of classes already written and open source, code examples etc.
I also do a fair bit with AS2 and this is a great platform but the community is no where near as advanced, and the language can act very strange sometimes, plus is also very tight and unforgiving.
I see no speed issues with PHP, no security problems (as often claimed) if you code sensibly and I like it. so there.