diff options
| author | Maxime Coste <mawww@kakoune.org> | 2024-11-30 12:27:11 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-11-30 23:29:34 +1100 |
| commit | 8769b94eb25cd7402db6caa4f0d4b417f6365703 (patch) | |
| tree | 06a4b5563c20e157292e31e2c6fe41f60c778a14 /src/buffer_utils.cc | |
| parent | 7ae1fd683defbd11b54ba7046df69be692ce4de5 (diff) | |
Cache buffer lines ArrayView in BufferIterator
The extra indirection of going through the buffer can be costly as
the compiler does not know the buffer is not supposed to be mutated
during iteration, so it has to actually reload the values which adds
memory accesses in the Buffer instance which can be costly in say
regex searches where memory access tends to dominate performance.
Storing this in the BufferIterator lets the compiler put this
info in registers and not reload it.
Diffstat (limited to 'src/buffer_utils.cc')
0 files changed, 0 insertions, 0 deletions
