One of the bigger problems with emacs is its font highlighting mechanism - typically it&#x27;s implemented with regular expressions adding stacked attributes to text. Lexical highlighting using a state machine, with state recorded at line start would be much much faster - like, multiple 1000x faster. Emacs pays for its flexibility with massive performance loss.<p>Compare something like joe editor (the jmacs named executable has emacs-like key bindings) for syntax highlighting; it&#x27;s night and day. Joe uses state machines (DFA) in a text description format for syntax highlighting. That means that strictly it can only do lexical highlighting, but that&#x27;s much much better than nothing - and fully correct syntax highlighting requires a deeper analysis than is normally done in emacs modes.<p>Joe itself would be much faster again if the state machine was compiled to machine code.