This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients BreamoreBoy, alexandre.vassalotti, amaury.forgeotdarc, belopolsky, collinwinter, hagen, pitrou, vstinner
Date 2010-09-27.22:23:11
SpamBayes Score 7.796053e-06
Marked as misclassified No
Message-id <1285626195.53.0.699037729019.issue3873@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-09-27 22:23:15pitrousetrecipients: + pitrou, collinwinter, amaury.forgeotdarc, belopolsky, vstinner, alexandre.vassalotti, hagen, BreamoreBoy
2010-09-27 22:23:15pitrousetmessageid: <1285626195.53.0.699037729019.issue3873@psf.upfronthosting.co.za>
2010-09-27 22:23:14pitroulinkissue3873 messages
2010-09-27 22:23:13pitroucreate