On July 10, 2014 11:21:43 PM EEST, Maxime Coste <frrr...@gmail.com> wrote: >On Thu, Jul 10, 2014 at 09:33:53AM -0700, Charlie Kester wrote: >> The problem with linked lists of lines and piece tables has always >been >> achieving good locality of reference. Not a problem with buffer gap, >> where locality was the main motivating factor behind the design. > >In my experience, an array of pointers to lines is a very efficient >choice, >You get O(1) access to any point in the buffer (provided you use ><line,column> >as coordinates), and in typical code sources lines are reasonably small >so >that using a single char array for lines is fast enough. > >Its easy to understand, implement and has excellent performances on non >patholical text text. > >From my experience with Kakoune, you almost never need the byte-offset >of a >character, but very often the line,column pair. So using these as basic >coordinates (and implementing the buffer backend in consequence) makes >much sense. I will agree that it's super easy to implement and understand and it covers most needs. But how about search? Is it fast?
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Zervas
- Re: [dev] [sandy] [PATCH] VIM key bindings. Martti Kühne
- Re: [dev] [sandy] [PATCH] VIM key bindings. Silvan Jegen
- Re: [dev] [sandy] [PATCH] VIM key bindings. Markus Teich
- Re: [dev] [sandy] [PATCH] VIM key bindings. Marc André Tanner
- Re: [dev] [sandy] [PATCH] VIM key bindings. Carlos Torres
- Re: [dev] [sandy] [PATCH] VIM key bindings. Carlos Torres
- Re: [dev] [sandy] [PATCH] VIM key bindings. Marc André Tanner
- Re: [dev] [sandy] [PATCH] VIM key bindings. Charlie Kester
- Re: [dev] [sandy] [PATCH] VIM key bindings. Maxime Coste
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Zervas
- Re: [dev] [sandy] [PATCH] VIM key bindings. Evan Gates
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Zervas
- Re: [dev] [sandy] [PATCH] VIM key bindings. Maxime Coste
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Zervas
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Papastamos
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Zervas
- Re: [dev] [sandy] [PATCH] VIM key bindings. Dimitris Papastamos
- Re: [dev] [sandy] [PATCH] VIM key bindings. Charlie Kester
- Re: [dev] [sandy] [PATCH] VIM key bindings. Maxime Coste
- Re: [dev] [sandy] [PATCH] VIM key bindings. Charlie Kester