Advertisement
anacrolix

python read perf

Nov 25th, 2011
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.66 KB | None | 0 0
  1. matt@stanley:~/Desktop$ for f in read bytearray_read readinto; do for v in 2.7 3.2 3.3; do echo -n "$f/$v "; "python$v" -m timeit -s 'import readinto' "readinto.$f()"; done; done
  2. read/2.7 100 loops, best of 3: 7.86 msec per loop
  3. read/3.2 10 loops, best of 3: 253 msec per loop
  4. read/3.3 10 loops, best of 3: 747 msec per loop
  5. bytearray_read/2.7 100 loops, best of 3: 7.9 msec per loop
  6. bytearray_read/3.2 100 loops, best of 3: 7.48 msec per loop
  7. bytearray_read/3.3 100 loops, best of 3: 15.8 msec per loop
  8. readinto/2.7 100 loops, best of 3: 8.93 msec per loop
  9. readinto/3.2 100 loops, best of 3: 10.3 msec per loop
  10. readinto/3.3 10 loops, best of 3: 20.4 msec per loop
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement