Python slow for filter scripts

Michael Hudson mwh at python.net
Thu Oct 30 12:49:27 CET 2003


William Park <opengeometry at yahoo.ca> writes:

> Alex Martelli <aleax at aleax.it> wrote:
> > [alex at lancelot bo]$ time perl cio.pl </x/kjv.txt >/dev/null
> > 0.07user 0.01system 0:00.11elapsed 72%CPU (0avgtext+0avgdata 0maxresident)k
> > 0inputs+0outputs (330major+61minor)pagefaults 0swaps
> 
> > [alex at lancelot bo]$ time python cio.py 2 </x/kjv.txt >/dev/null
> > 0.27user 0.00system 0:00.30elapsed 87%CPU (0avgtext+0avgdata 0maxresident)k
> > 0inputs+0outputs (448major+278minor)pagefaults 0swaps
> 
> > [alex at lancelot bo]$ time python cio.py 1 </x/kjv.txt >/dev/null
> > 0.07user 0.03system 0:00.10elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
> > 0inputs+0outputs (447major+276minor)pagefaults 0swaps
> 
> > [alex at lancelot bo]$ time python cio.py 3 </x/kjv.txt >/dev/null
> > 0.03user 0.02system 0:00.10elapsed 47%CPU (0avgtext+0avgdata 0maxresident)k
> > 0inputs+0outputs (447major+275minor)pagefaults 0swaps
> 
> But, nothing can beat
>     time cat < kjv.txt > /dev/null
> :-)

time true ?

(thinking of

http://mail.python.org/pipermail/python-dev/2003-February/033785.html

)

Cheers,
mwh

-- 
58. Fools ignore complexity. Pragmatists suffer it. Some can avoid
    it. Geniuses remove it.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html




More information about the Python-list mailing list