Message298285
Hello, I have noticed a significant performance regression when allocating a large shared array in Python 3.x versus Python 2.7. The affected module seems to be `multiprocessing`. The function I used for benchmarking: from timeit import timeit timeit('sharedctypes.Array(ctypes.c_float, 500*2048*2048)', 'from multiprocessing import sharedctypes; import ctypes', number=1) And the results from executing it: Python 3.5.2 Out[2]: 182.68500420999771 ------------------- Python 2.7.12 Out[6]: 2.124835968017578 I will try to provide any information you need. Right now I am looking at callgrind/cachegrind without Debug symbols, and can post that, in the meantime I am building Python with Debug and will re-run the callgrind/cachegrind. Allocating the same-size array with numpy doesn't seem to have a difference between Python versions. The numpy command used was `numpy.full((500,2048,2048), 5.0)`. Allocating the same number of list members also doesn't have a difference - `arr = [5.0]*(500*2048*2048)` | |
| Date | User | Action | Args | | 2017-07-13 14:03:22 | dtasev | set | recipients: + dtasev | | 2017-07-13 14:03:22 | dtasev | set | messageid: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> | | 2017-07-13 14:03:22 | dtasev | link | issue30919 messages | | 2017-07-13 14:03:21 | dtasev | create | | |