New issue 2750: array resize through slice assignment slow
https://bitbucket.org/pypy/pypy/issues/2750/array-resize-through-slice-assignment-slow
Christoph Reiter:
```
#!python
import array
def x(n):
data = array.array('B')
for i in range(n):
data[i:i+1] = array.array("B", [0])
x(20000)
```
With CPython the time per assignment with increasing "n" stays constant, while
in PyPy it increases with "n".
There is no real use case behind this, as I can easily preallocate the array
which makes things work. I just noticed that one of my test cases got stuck
under pypy because it resized an array 100000 times, and with CPython this was
near instant.
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue