Python vs. Ruby (and os.path.walk)

Matt Gerrans mgerrans at mindspring.com
Sat Aug 10 03:33:39 EDT 2002


> Are you sure nothing else was running in the background during these
tests?

This whole thing piqued my interest a little, so I took Ruby's
pi-digits-calculating script and wrote a Python version (which was trivial:
add two colons, remove two "end"s, import sys and use sys.stdout to print
single chars without a trailing space).   When run separately, they work at
about the same speed, but interestingly, when run in parallel in two shells
side-by-side, Python kicks butt!   Even when the Ruby process is started
first.  Maybe the Python program gives itself a priority boost?   Or maybe
it detects Ruby is running and lowers its thread priority?  :-)





More information about the Python-list mailing list