Problem: Copying or slicing a List allocates every item individually,
even though the number of items is known in advance.
Solution: Allocate the List and all of its items in a single block with
list_alloc_with_items(), as list_concat() already does.
Measured with perf stat -e instructions on workloads that model list-heavy plugin usage:
As a nice side-effect, I think it makes the code a tad more clear/clean.
https://github.com/vim/vim/pull/21222
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()