quchen / prettyprinter

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

Rendering of `SLine` could be optimized #228

Open sjakobi opened 2 years ago

sjakobi commented 2 years ago

Currently this usually involves the allocation of a fresh Text containing multiple spaces via textSpaces. It would probably be better to use a slice of a pre-allocated buffer.

Maybe the newline could/should even be included as the first byte of that buffer?!