1. 8
  1.  

  2. 3

    It’s fast. This solution has the potential to be lightning fast. There are some additional optimizations to take into account, which are explained in detail here

    the link was dead - here’s a backup: https://web.archive.org/web/20171109151832/http://www.catch22.net/tuts/piece-chains

    1. 2

      Google is working on a high-performance editor called Xi and I remember having read an in-depth discussion of its data structures.