Message365541
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. |
|
Date |
User |
Action |
Args |
2020-04-02 00:44:09 | vstinner | set | recipients:
+ vstinner, mgorny, ware, Anselmo Melo, bc |
2020-04-02 00:44:09 | vstinner | set | messageid: <1585788249.05.0.124264820797.issue39503@roundup.psfhosted.org> |
2020-04-02 00:44:09 | vstinner | link | issue39503 messages |
2020-04-02 00:44:08 | vstinner | create | |
|