Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 49,211 posts.

Any topic
Any year
12519

Text showdown: Gap Buffers vs. Ropes

I have been working on a hobby project to reimagine the C core of Emacs in Rust. On this journey, I reached the point where I needed some way to represent the text of a buffer. The simplest approach is to just use a large string or array of lines. However these each suffer from poor performance as either the size or…