Message76915
C.l.p poster reported that 3.0 file.read is orders of magnitude slower
than with 2.5 (but confused issue with buffer = 0). Jerry Hill reported
"Here's a quick comparison between 2.5 and
3.0 on a relatively small 17 meg file:
C:\>c:\Python30\python -m timeit -n 1
"open('C:\\work\\temp\\bppd_vsub.csv', 'rb').read()"
1 loops, best of 3: 36.8 sec per loop
C:\>c:\Python25\python -m timeit -n 1
"open('C:\\work\\temp\\bppd_vsub.csv', 'rb').read()"
1 loops, best of 3: 33 msec per loop
That's 3 orders of magnitude slower on python3.0!"
I verified this informally on WinXP by opening and then reading
Doc/Pythonxy.chm (about 4 megs) -- an eye blink versus 3 seconds,
repeated. Even the open seemed slower but I did not time it.
>>> f=open('Doc/Python30.chm','rb')
>>> d=f.read() |
|
Date |
User |
Action |
Args |
2008-12-04 18:30:20 | terry.reedy | set | recipients:
+ terry.reedy |
2008-12-04 18:30:20 | terry.reedy | set | messageid: <1228415420.85.0.256947820591.issue4533@psf.upfronthosting.co.za> |
2008-12-04 18:30:19 | terry.reedy | link | issue4533 messages |
2008-12-04 18:30:18 | terry.reedy | create | |
|