Get the latest tech news

Zed Decoded: Rope and SumTree


In this episode of Zed Decoded, Thorsten asks the founders — Nathan, Max, Antonio — about the data structures at the heart of Zed: Rope and SumTree.

To do that, a text editor has to load the file contents into memory — you can't just let the user stare at the raw bytes on disk. To give you a taste: Emacs uses gap buffers, VS Code uses a twist on piece tables, Vim has its own tree data structure, and Helix uses a rope. They're not the best choice for an editor that only supports local editing patterns, since they leave a lot of performance on the table compared to gap buffers in that case (again, even for huge documents).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of rope

rope

Photo of Zed Decoded

Zed Decoded

Photo of SumTree

SumTree

Related news:

News photo

Zed Decoded: Async Rust

News photo

Apple isn't freaking out about AI, it's rope-a-doping the competition