diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2018-03-26 09:01:30 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2018-03-26 09:01:30 -0400 |
commit | b300052fb4ef1261519b0fd57f5eb186c2d10295 (patch) | |
tree | dcaf4fd080ac04ee6128568351b01fb693d069c0 /lisp/emacs-lisp | |
parent | 9c1176247b107fd6e1845618b78ad56b5d57ddd9 (diff) | |
download | emacs-b300052fb4ef1261519b0fd57f5eb186c2d10295.tar.gz emacs-b300052fb4ef1261519b0fd57f5eb186c2d10295.tar.bz2 emacs-b300052fb4ef1261519b0fd57f5eb186c2d10295.zip |
* src/marker.c: Try and speed up byte<->char conversion with many markers.
When considering markers (to find a starting point for the conversion),
typically one of the two bounds is nearby (coming from
cached_(byte|char)pos) but the other is far (point-min or point-max),
so change the exit condition so we stop as soon as *one* of the bounds
is near.
(BYTECHAR_DISTANCE_INITIAL, BYTECHAR_DISTANCE_INCREMENT): New constants.
(buf_charpos_to_bytepos, buf_bytepos_to_charpos): Use them to try and
reduce the number of markers we consider.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions