aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/range.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-08-16 08:29:58 -0400
committerGitHub <noreply@github.com>2026-08-16 08:29:58 -0400
commit83730db6477484c773f39c8cc18c30e09dd76f4c (patch)
tree7a66db0ef942f24663beb5d5017b795665cd8e68 /runtime/lua/vim/range.lua
parent2edb1c000958952c87edda596ed9ed53628084ed (diff)
downloadrneovim-83730db6477484c773f39c8cc18c30e09dd76f4c.tar.gz
rneovim-83730db6477484c773f39c8cc18c30e09dd76f4c.tar.bz2
rneovim-83730db6477484c773f39c8cc18c30e09dd76f4c.zip
perf(marktree): binary search the node intersect array #41331
Problem: Undo of a change spanning many paired marks is quadratic. A node's "intersect" array holds every pair crossing that node, and both intersect_node() and unintersect_node() walked it linearly. Undoing an edit over 1M paired marks spends 68% of its time in unintersect_node()'s scan alone. Solution: The array is sorted, so binary search it. marks undo before after 200k 831ms 385ms 1M 14006ms 3820ms Redo is unaffected: it is dominated by marktree_move() actually repositioning the marks.
Diffstat (limited to 'runtime/lua/vim/range.lua')
0 files changed, 0 insertions, 0 deletions