haskell-prettyprinter / haskell-prettyprinter/prettyprinter

`unsafeTextWithoutNewlines` might be slower than necessary

Open
#231 1 comment 0 reactions 0 assignees View on GitHub
Performance
Dominant language
Haskell
Stars
309
Forks
43
Avg merge
21h 25m
Merged PRs (30d)
1

Description

https://github.com/quchen/prettyprinter/blob/0dbe08f65468697b729d5e05c98c89a58a42486b/prettyprinter/src/Prettyprinter/Internal.hs#L468-L477

It seems that this function would allocate a new `Text` value in order to perform the `T.null` check on it. GHC _may_ be able to optimize this allocation away, but it seems fragile.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.