diff options
| author | Yi Ming <ofseed@foxmail.com> | 2026-05-06 05:04:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-05 17:04:11 -0400 |
| commit | 97de5f145aae6103c1ebe945a8d397378b1960c3 (patch) | |
| tree | b5431401b29a07ff4fd0bc024d10dc5eec2b3cdb /runtime/lua/vim/provider/python.lua | |
| parent | ed194b99ac7ddf84dda8c8239fdc10bb02275b4b (diff) | |
| download | rneovim-97de5f145aae6103c1ebe945a8d397378b1960c3.tar.gz rneovim-97de5f145aae6103c1ebe945a8d397378b1960c3.tar.bz2 rneovim-97de5f145aae6103c1ebe945a8d397378b1960c3.zip | |
perf(lua): memoize `key_fn` results #39568
Problem:
When using `vim.list.unique` or `vim.list.bisect`, if the `key` function is
complex, it can degrade performance, because it is invoked on every comparison
Solution:
The `key` interface convention is designed specifically to address this issue;
performance can be improved by memoizing its results.
Also added the shorthand use of the field name string as the key.
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions