PHP vs. Python vs. Perl

Steven Grimm sgrimm at facebook.com
Wed Jun 28 20:59:17 UTC 2006


I think this is really a test of libmemcache vs. Python vs. Perl. From 
what you've described, it sounds like PHP's performance was basically 
not a factor in the results since all the work was being done by the C 
memcached client library.

My guess is that if you were to wire libmemcache into Python or Perl 
(say, using SWIG) you would see a similar speed increase there too. 
Based on your other results, you'd probably be back to mod_perl being 
the fastest of the three.

We actually use the native PHP client with a bunch of local 
modifications rather than the libmemcache-based one. That's for a few 
reasons: when we were first setting up memcached, libmemcache was too 
unstable (which seems to no longer be the case), we want to be able to 
do rapid test cycles on changes to the client library, and finally, our 
profiling shows that the memcached client code represents a tiny 
fraction -- in the 1% range -- of the total CPU time we take to display 
a page.

-Steve


More information about the memcached mailing list