diff options
| author | Stefan Monnier | 2022-11-07 00:38:43 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2022-11-07 00:38:43 -0500 |
| commit | 35221a7bd55e18244604376497097f4259c7351b (patch) | |
| tree | b471f73adcd5c6ddc26127014fee554e78e61873 /lib/diffseq.h | |
| parent | 61d55ce3bb4dc1f7deac552439c61bbe0909dcdb (diff) | |
| download | emacs-35221a7bd55e18244604376497097f4259c7351b.tar.gz emacs-35221a7bd55e18244604376497097f4259c7351b.zip | |
(itree_insert_gap, itree_delete_gap): Minor optimization
`limit` can get smaller in either of the two children of a node.
It can also happen that the root node itself has a low enough limit
that the loop can be interrupted right away.
The previous code only checked `limit` when going down to a left
child, which is not wrong, but tests suggest that it is also very
common to reach this limit when going to a right child, so move the
test accordingly.
* src/itree.c (itree_insert_gap, itree_delete_gap): Check `limit` for
all nodes, rather than only when following a `left` pointer.
Diffstat (limited to 'lib/diffseq.h')
0 files changed, 0 insertions, 0 deletions