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 serhiy.storchaka
Recipients jcea, nadeem.vawda, serhiy.storchaka, victorhooi
Date 2012-09-26.10:06:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <201209261306.31173.storchaka@gmail.com>
In-reply-to <201209251037.40494.storchaka@gmail.com>
Content
Here is a patch and benchmark script. This required more time than I thought.

Benchmark results:

Unpatched:

5.3     read(1)
0.5     read(10)
0.049   read(100)
0.013   read(1000)
0.009   read(10000)
0.0085  read(100000)
0.0082  read()
5       read1(1)
0.47    read1(10)
0.046   read1(100)
0.012   read1(1000)
0.0089  read1(10000)
0.0084  read1(100000)
0.0082  read1()
0.15    readline()

Patched:

0.73    read(1)
0.082   read(10)
0.015   read(100)
0.0089  read(1000)
0.0082  read(10000)
0.0084  read(100000)
0.0083  read()
0.78    read1(1)
0.087   read1(10)
0.016   read1(100)
0.0089  read1(1000)
0.0082  read1(10000)
0.0082  read1(100000)
0.008   read1()
0.14    readline()
Files
File name Uploaded
bz2_faster_read.patch serhiy.storchaka, 2012-09-26.10:06:47
bz2bench.py serhiy.storchaka, 2012-09-26.10:06:49
History
Date User Action Args
2012-09-26 10:06:50serhiy.storchakasetrecipients: + serhiy.storchaka, jcea, nadeem.vawda, victorhooi
2012-09-26 10:06:50serhiy.storchakalinkissue16034 messages
2012-09-26 10:06:49serhiy.storchakacreate