-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redundant annotation handling in prettyprinter's renderLazy #165
Labels
Comments
I've had a brief look at the Core and couldn't find any sign of concatenating empty |
sjakobi
added a commit
that referenced
this issue
Jun 12, 2020
…to avoid the annotation stack handling overhead of the stack machine renderer. Addresses #165.
sjakobi
added a commit
that referenced
this issue
Jun 13, 2020
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.
sjakobi
added a commit
that referenced
this issue
Jun 13, 2020
renderSimplyDecorated's keeping track of the annotation stack wasn't actually necessary here. With the new 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the annotation handling with
(pure mempty)
has a performance cost, we should probably try to get rid of it.prettyprinter/prettyprinter/src/Data/Text/Prettyprint/Doc/Render/Text.hs
Lines 58 to 59 in a03a2bf
prettyprinter/prettyprinter/src/Data/Text/Prettyprint/Doc/Render/Util/StackMachine.hs
Lines 66 to 84 in a03a2bf
The text was updated successfully, but these errors were encountered: