Amanieu opened PR #2714 from more_entitylist to main:
This PR contains several improvements to EntityList:
swap_removehad poor codegen because it ends up callingremoveand doing a bunch of redundant work. I factored out the code to remove the last element of a list intoremove_last, which is used by bothremoveandswap_remove.- Added
deep_clonewhich copies all elements to a new list. This is difficult to implement efficiently otherwise since it requires mutable access to the list pool for one lists while reading from another list.- Added
truncatewhich efficiently shortens a list without needing to remove elements individually.
cfallin submitted PR Review.
cfallin merged PR #2714.
Last updated: Dec 13 2025 at 19:03 UTC