[pypy-commit] [Git][pypy/pypy][branch/default] 6 commits: Add rgc.ll_arraymove(), as a way to shift items inside the same array

Armin Rigo foss at heptapod.net
Mon Jun 22 10:33:13 EDT 2020



Armin Rigo pushed to branch branch/default at PyPy / pypy


Commits:
59093c47 by Armin Rigo at 2020-06-16T12:43:27Z
Add rgc.ll_arraymove(), as a way to shift items inside the same array
with proper GC support.

--HG--
branch : wb_before_move

- - - - -
97f2ddfe by Armin Rigo at 2020-06-16T12:51:54Z
Direct tests for rgc.ll_arraymove()

--HG--
branch : wb_before_move

- - - - -
a330912d by Armin Rigo at 2020-06-16T14:17:05Z
oops, only issue a general write_barrier() if at least one card is set

--HG--
branch : wb_before_move

- - - - -
9a3ba0b8 by Armin Rigo at 2020-06-16T14:20:01Z
do it in minimark.py too

--HG--
branch : wb_before_move

- - - - -
d681e653 by Armin Rigo at 2020-06-16T14:51:48Z
Copy this from ll_arraycopy().  Unsure it's needed but it might.

--HG--
branch : wb_before_move

- - - - -
ee9868f2 by Armin Rigo at 2020-06-22T14:33:07Z
Merge branch 'branch/wb_before_move' into 'branch/default'

Speed up list.pop/list.insert operations that shift many items

list.pop/list.insert operations that shift many items were very slow in old large list objects.  This is because it was done by manually reading and writing all items, and the card-marking adds overhead to every single write.  With this branch, it's done via support for a new operation in the GC, writebarrier_before_move().  This could be renamed if needed for other use cases, but basically, this operation takes an array, looks for the flag that says there is at least one marked card in it, and in that case applies a general write barrier to it.  After such an operation, the shift of items can always be done with a simple memmove() call.

See merge request pypy/pypy!729

- - - - -


13 changed files:

- rpython/memory/gc/generation.py
- rpython/memory/gc/incminimark.py
- rpython/memory/gc/minimark.py
- rpython/memory/gctransform/framework.py
- rpython/memory/gctransform/transform.py
- rpython/memory/gcwrapper.py
- rpython/rlib/rgc.py
- rpython/rlib/test/test_rgc.py
- rpython/rtyper/llinterp.py
- rpython/rtyper/lltypesystem/llmemory.py
- rpython/rtyper/lltypesystem/lloperation.py
- rpython/rtyper/lltypesystem/opimpl.py
- rpython/rtyper/rlist.py


View it on GitLab: https://foss.heptapod.net/pypy/pypy/compare/547c7249621823ae1e4f3d5feb46533b02f1ed3d...ee9868f2c3a5d53c2d8aac4928aec2d75a4416d0

-- 
View it on GitLab: https://foss.heptapod.net/pypy/pypy/compare/547c7249621823ae1e4f3d5feb46533b02f1ed3d...ee9868f2c3a5d53c2d8aac4928aec2d75a4416d0
You're receiving this email because of your account on foss.heptapod.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-commit/attachments/20200622/b3f38fc0/attachment.html>


More information about the pypy-commit mailing list