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 vstinner
Recipients Anselmo Melo, bc, mgorny, vstinner, ware
Date 2020-04-02.00:44:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585788249.05.0.124264820797.issue39503@roundup.psfhosted.org>
In-reply-to
Content
Ooooh, I see. I didn't measure the performance of the right header. I re-run a benchmark using the HTTP header (repeat=15):

    header = 'Basic ' + ', ' * 15 + 'A'

Now I see a major performance difference. Comparison between master ("ref") and PR 18284 ("fix"):

Mean +- std dev: [ref] 88.9 ms +- 2.4 ms -> [fix] 17.5 us +- 0.7 us: 5083.23x faster (-100%)

So the worst case is now way faster: more than 5000x faster!

It's even possible to go up to repeat=10**6 characters, it still takes less than 1 seconds: 412 ms +- 19 ms.

On the master branch, repeat=20 already takes around 3 seconds... The slowdown is exponential with repeat increase.
History
Date User Action Args
2020-04-02 00:44:09vstinnersetrecipients: + vstinner, mgorny, ware, Anselmo Melo, bc
2020-04-02 00:44:09vstinnersetmessageid: <1585788249.05.0.124264820797.issue39503@roundup.psfhosted.org>
2020-04-02 00:44:09vstinnerlinkissue39503 messages
2020-04-02 00:44:08vstinnercreate