Antoine Pitrou <pit...@free.fr> added the comment:

Here is a patch using peek() rather than seek(). There are some inefficiencies 
around (such as using read() to skip the consumed prefetched bytes), but the 
benchmark results are still as good as with seek():

Protocol 0
- dump: 142.5 ms
- load (seekable=False): 598.8 ms
- load (seekable=True): 240.2 ms

Protocol 1
- dump: 28.9 ms
- load (seekable=False): 253.2 ms
- load (seekable=True): 25.7 ms

Protocol 2
- dump: 28.9 ms
- load (seekable=False): 253.3 ms
- load (seekable=True): 25.7 ms

----------
Added file: http://bugs.python.org/file19034/unpickleprefetch3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to