Commit ec8759b
authored
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
1 parent 2560c61 commit ec8759b
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
6587 | 6587 | | |
6588 | 6588 | | |
6589 | 6589 | | |
| 6590 | + | |
6590 | 6591 | | |
6591 | 6592 | | |
6592 | 6593 | | |
| |||
6696 | 6697 | | |
6697 | 6698 | | |
6698 | 6699 | | |
| 6700 | + | |
6699 | 6701 | | |
6700 | 6702 | | |
6701 | 6703 | | |
| |||
7106 | 7108 | | |
7107 | 7109 | | |
7108 | 7110 | | |
7109 | | - | |
7110 | | - | |
7111 | | - | |
7112 | | - | |
| 7111 | + | |
| 7112 | + | |
| 7113 | + | |
| 7114 | + | |
| 7115 | + | |
7113 | 7116 | | |
7114 | 7117 | | |
7115 | 7118 | | |
7116 | | - | |
| 7119 | + | |
| 7120 | + | |
7117 | 7121 | | |
7118 | 7122 | | |
7119 | 7123 | | |
| |||
7855 | 7859 | | |
7856 | 7860 | | |
7857 | 7861 | | |
| 7862 | + | |
| 7863 | + | |
| 7864 | + | |
7858 | 7865 | | |
7859 | 7866 | | |
7860 | 7867 | | |
| |||
0 commit comments