New pretty printer that operates in linear time.  The string is accumulated into a string builder via a traversal of the parse tree.
The other pretty printer is compositional in nature but it is slower -- the leaf strings are repeatedly copied as we go up the tree.