For a while now, I've been writing a small text editor. The idea is that I have a basic mvp that I can add to here and there. Currently I'm writing it in c++ using SDL2 to render and using a doubly linked list of gap buffers to store the text. At the moment it's not as performant as I'd like it to be and I've been wondering if there's more efficient ways to store text and render it. Maybe my question sounds stupid, but is there lightweight libraries out there to render text and get keyboard input FAST? In the same vein, is there better more efficient ways of storing text other than using a linked list of gap buffers?