15 ms·
> In fact, the editor I’m writing this in – Emacs – uses a gap buffer, and it’s probably the fastest editor I’ve ever used. That fact alone is a pretty convinci
by PH95VuimJjqBqy 3y ago
> In fact, the editor I’m writing this in – Emacs – uses a gap buffer, and it’s probably the fastest editor I’ve ever used. That fact alone is a pretty convincing argument to use a gap buffer.
I know for a fact that vim is faster than Emacs and I'm pretty sure it uses an array (although I don't know that for a fact).
- kragen 3y agoi thought vim used an array of lines, not an array of bytes, but it turns out it's more like an array of pages; https://www.free-soft.org/FSM/english/issue01/vim.html https://www.free-soft.org/FSM/english/issue01/vim.html describes it, https://github.com/vim/vim/blob/e723c42836d971180d1bf9f98916966c5543fff1/src/memline.c https://github.com/vim/vim/blob/e723c42836d971180d1bf9f98916... is the implementation