[pypy-issue] [issue1486] Pypy disk IO is slower than python2.6?
shenlong
tracker at bugs.pypy.org
Wed May 15 14:13:59 CEST 2013
New submission from shenlong <shenlong1996 at gmail.com>:
import os
def main():
path = "XXX"
dir_list=os.listdir(path)
for i in dir_list:
f=open(path+i)
j=0
for line in f:
j+=1
f.close
if __name__=='__main__':
main()
with python2.6
time python26 -m profile tool3.py
2644 function calls in 1.898 CPU seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 1.897 1.897 :0(execfile)
1 0.001 0.001 0.001 0.001 :0(listdir)
2637 0.040 0.000 0.040 0.000 :0(open)
1 0.001 0.001 0.001 0.001 :0(setprofile)
1 0.000 0.000 1.897 1.897 <string>:1(<module>)
1 0.000 0.000 1.898 1.898 profile:0(execfile('tool3.py'))
0 0.000 0.000 profile:0(profiler)
1 0.000 0.000 1.897 1.897 tool3.py:3(<module>)
1 1.856 1.856 1.897 1.897 tool3.py:5(main)
real 0m1.968s
user 0m1.518s
sys 0m0.449s
with pypy
time pypy -m profile tool3.py
5 function calls in 3.809 seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.002 0.002 0.002 0.002 :0(listdir)
1 0.001 0.001 0.001 0.001 :0(setprofile)
1 0.001 0.001 3.809 3.809 profile:0(<code object <module>,
file 'tool3.py', line 3>)
0 0.000 0.000 profile:0(profiler)
1 0.001 0.001 3.807 3.807 tool3.py:3(<module>)
1 3.804 3.804 3.806 3.806 tool3.py:5(main)
real 0m4.111s
user 0m3.477s
sys 0m0.480s
----------
messages: 5721
nosy: pypy-issue, sd87271833
priority: performance bug
status: chatting
title: Pypy disk IO is slower than python2.6?
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1486>
________________________________________
More information about the pypy-issue
mailing list