-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Optimize indentation in the pretty printer. #59507
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Some local measurements.
The bigger improvements are for incremental compilation. |
@bors try |
Optimize indentation in the pretty printer. Currently the pretty-printer calls `write!` for every space of indentation. On some workloads the indentation level can exceed 100, and a faster implementation reduces instruction counts by up to 7% on a few workloads.
☀️ Try build successful - checks-travis |
@rust-timer build cf0a738 |
Success: Queued cf0a738 with parent 237bf32, comparison URL. |
Finished benchmarking try commit cf0a738 |
r=me with nits addressed |
bca0279
to
a7292a7
Compare
I addressed the nits. Measurements show that avoiding @bors r=petrochenkov |
📌 Commit a7292a7216dae4d40856c62bdfac7fd2432bc351 has been approved by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write
isn't guaranteed to write all of the bytes.
@bors r-
^--- @bors r- |
Currently the pretty-printer calls `write!` for every space of indentation. On some workloads the indentation level can exceed 100, and a faster implementation reduces instruction counts by up to 7% on a few workloads.
a7292a7
to
606f315
Compare
I changed the @bors r=petrochenkov |
📌 Commit 606f315 has been approved by |
Optimize indentation in the pretty printer. Currently the pretty-printer calls `write!` for every space of indentation. On some workloads the indentation level can exceed 100, and a faster implementation reduces instruction counts by up to 7% on a few workloads.
☀️ Test successful - checks-travis, status-appveyor |
Currently the pretty-printer calls
write!
for every space ofindentation. On some workloads the indentation level can exceed 100, and
a faster implementation reduces instruction counts by up to 7% on a few
workloads.