[issue38891] ShareableList read and write access is O(N), should be O(1)

Jake Northey report at bugs.python.org
Thu Nov 21 21:31:14 EST 2019


New submission from Jake Northey <janorthey at connamara.com>:

For an illustration of the performance implications of the __getitem__ and __setitem__ implementation, see the article below.
https://medium.com/@rvprasad/performance-of-system-v-style-shared-memory-support-in-python-3-8-d7a7d1b1fb96

The issue appears to be due to the summing of ShareableList item sizes to generate an offset for the requested item.  Perhaps an offset-based index could be created in which the allocation sizes could be constructed by comparing two offets.

----------
components: Library (Lib)
messages: 357239
nosy: Jake Northey, davin
priority: normal
severity: normal
status: open
title: ShareableList read and write access is O(N), should be O(1)
type: performance
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38891>
_______________________________________


More information about the Python-bugs-list mailing list