That depends what you consider faster. PHP will save you some q&d hacking time, but Python will save you more in the longer term IMHO. For the other speed, see http://shootout.alioth.debian.org/