Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Visual Studio Code: Text Buffer Reimplementation (2018) (visualstudio.com)
54 points by stefankuehnel 7 months ago | hide | past | favorite | 6 comments


The piece table is an amazing editor data structure. Reasonably simple to grasp conceptually, memory efficient for large files, good cache-locality, allow easy undo/redo, original file can be read-only, etc.

Newer editors seem to prefer Rope though.


Is there an overview of which editor uses which data structures? I am particularly interested in GNU Emacs, vi(m), Sublime and other popular text editors among Hackers.


Sadly I think plain old Visual Studio isn't getting much love these days.

At least Rider exist, so if they fall too far behind that will just keep growing in market share.



I was surprised they didn’t go with a Rope, too, but I haven’t evaluated one compared to a piece table


I’m surprised they got away with an ordered Array as long as they did. It’s almost prima facia poorly performing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: