Python slow for filter scripts
Stan Graves
soundinmotiondj at yahoo.com
Wed Oct 29 11:54:41 EST 2003
Alex Martelli <aleax at aleax.it> wrote in message news:<VVCnb.370402$R32.12250533 at news2.tin.it>...
> It really depends on what you're doing. I tried the following:
Me too!
I ran these on a hp-ux 11.00 box. The input was a 560K html file that
I had laying around.
Overall, python was about 3 times slower than perl...and remarkable
consistant for the three different methods.
stang at ettin$ ll ./print.html
-rw-r--r-- 1 stan users 567154 Oct 29 10:30
./print.html
stang at ettin$ time cio.pl < ./print.html > /dev/null
real 0m0.10s
user 0m0.06s
sys 0m0.03s
stang at ettin$ time cio.pl < ./print.html > /tmp/test
real 0m0.18s
user 0m0.06s
sys 0m0.04s
stang at ettin$ time cio.py 1 < ./print.html > /dev/null
real 0m0.85s
user 0m0.30s
sys 0m0.11s
stang at ettin$ time cio.py 1 < ./print.html > /tmp/test
real 0m0.45s
user 0m0.29s
sys 0m0.11s
stang at ettin$ time cio.py 2 < ./print.html > /dev/null
real 0m0.76s
user 0m0.64s
sys 0m0.11s
stang at ettin$ time cio.py 2 < ./print.html > /tmp/test
real 0m0.81s
user 0m0.64s
sys 0m0.12s
stang at ettin$ time cio.py 3 < ./print.html > /dev/null
real 0m0.43s
user 0m0.16s
sys 0m0.10s
stang at ettin$ time cio.py 3 < ./print.html > /tmp/test
real 0m0.33s
user 0m0.17s
sys 0m0.12s
stang at ettin$
--Stan Graves
stan at SoundInMotionDJ.com
http://www.SoundInMotionDJ.com
More information about the Python-list
mailing list