News for hackers. Stuff that matters.
Re:Text Showdown: Gap Buffers vs. Ropes by IshKebab on Tuesday October 10, 2023 @02:18AM (#37829044)
You can possible use an array of (heap allocated) ring buffers. I heard about that data structure a while ago and it is clever but I have never seen anyone use it.

It means an insertion anywhere just involves M character moves where M is the number of ring buffers.

The data layout won't quite be as nice as a gap buffer (2 chunks), instead you get 2*M chunks. But if you make your ring buffers like 10MB it's probably fine.

There are no comments on this comment yet.