quchen / prettyprinter

A modern, extensible and well-documented prettyprinter.
BSD 2-Clause "Simplified" License
293 stars 34 forks source link

Speed up prettyprinter's renderLazy #166

Closed sjakobi closed 4 years ago

sjakobi commented 4 years ago

renderSimplyDecorated's keeping track of the annotation stack wasn't actually necessary here. With the custom render loop, we speed up the large-output benchmarks by roughly 10%.

Note that this also removes some error detection functionality for SimpleDocStreams with unbalanced SAnnPush and SAnnPop constructors.

Fixes #165.