Closed Kmeakin closed 1 year ago
heaptrack ./target/release/fathom data --module formats/opentype.fathom /usr/share/fonts/liberation/LiberationMono-Bold.ttf
main
: 142.9MBnew-pretty
: 10.4MBhyperfine -w 1 -r 10 "./target/release/fathom data --module formats/opentype.fathom /usr/share/fonts/liberation/LiberationMono-Bold.ttf"
:
main
: 328.9 ms ± 4.0 msnew-pretty
: 24.0 ms ± 0.5 msAbandoned in favour of https://github.com/yeslogic/fathom/pull/483
Rewrote the surface pretty printer using the algorithm from A New Language-Independent Prettyprinting Algorithm. The resulting code is a little imperative compared to the old functional style, but I think it should be possible to write a functional wrapper around the imperative algorithm.
TODO: