effect of *pretty-print* on compile-times

Bug #741730 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Medium
Unassigned

Bug Description

From #lisp, talking about quicklisp:

<Xach> whee, builds just got 1000 seconds faster by setting *print-pretty* to nil.
...
<Xach> 4500 to 3500, actually.
...
<nikodemus> is that on sbcl, or all platforms?
...
<Xach> SBCL

I find this surprising. Maybe it's unavoidable, but should be tracked down anyways.

Tags: compiler
Revision history for this message
Douglas Katzman (dougk) wrote :

The pretty-printer has gotten hugely faster since this bug was opened.
I measured somewhere around 5x faster for forms involving backquote, which now prints in a single pass instead of multiple passes for various different reasons.
(Not counting a pre-pass for circularity detection if applicable, and general pretty-printer overhead such as buffering/queuing)

The speedup is based on not having to reverse-engineer forms like (SB-IMPL::BACKQ-LIST 'X Y) into `(X ,Y), so we save significantly on consing. Additionally, printing a comma no longer requires an evil hack that printed into a string-stream first to decide whether the material under control of the comma would cause a non-splicing comma to accidentally look like splicing-comma, as could happen with a symbol whose name begins with dot or at-sign.

So despite it being a little concerning that the compiler was doing so much output that this actually mattered, I'm marking "fixed"

Changed in sbcl:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.