diff options
author | Batuhan Taskaya <batuhan@python.org> | 2021-07-02 19:03:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 19:03:58 (GMT) |
commit | ec8759b060eff83ff466f42c5a96d83a685016ce (patch) | |
tree | 546e1151c7f5f295bb885ea7ca690effb264cea3 /Python/makeopcodetargets.py | |
parent | 2560c612c89ea2534b90a266aabf76dc74d93a12 (diff) | |
download | cpython-ec8759b060eff83ff466f42c5a96d83a685016ce.zip cpython-ec8759b060eff83ff466f42c5a96d83a685016ce.tar.gz cpython-ec8759b060eff83ff466f42c5a96d83a685016ce.tar.bz2 |
bpo-43950: optimize column table assembling with pre-sizing object (GH-26997)
The new resizing system works like this;
```
$ cat t.py
a + a + a + b + c + a + a + a + b + c + a + a + a + b + c + a + a + a + b + c
[repeated 99 more times]
$ ./python t.py
RESIZE: prev len = 32, new len = 66
FINAL SIZE: 56
-----------------------------------------------------
RESIZE: prev len = 32, new len = 66
RESIZE: prev len = 66, new len = 134
RESIZE: prev len = 134, new len = 270
RESIZE: prev len = 270, new len = 542
RESIZE: prev len = 542, new len = 1086
RESIZE: prev len = 1086, new len = 2174
RESIZE: prev len = 2174, new len = 4350
RESIZE: prev len = 4350, new len = 8702
FINAL SIZE: 8004
```
So now we do considerably lower number of `_PyBytes_Resize` calls.
Automerge-Triggered-By: GH:isidentical
Diffstat (limited to 'Python/makeopcodetargets.py')
0 files changed, 0 insertions, 0 deletions