Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Extend Printer::buf on demand. #50339
Conversation
So that 55 entries (at 48 bytes each) don't need to be eagerly initialized on creation. This speeds up numerous rust-perf benchmark runs, by up to 3%.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
Oh yeah, I remember seeing this when profiling compilations of Stylo. Thanks, @nnethercote! @bors r+ |
|
|
Extend Printer::buf on demand.
So that 55 entries (at 48 bytes each) don't need to be eagerly
initialized on creation.
This speeds up numerous rust-perf benchmark runs, by up to 3%.
```
crates.io-check
avg: -2.4% min: -3.7% max: -1.1%
encoding-check
avg: -2.1% min: -2.9% max: -1.2%
crates.io-opt
avg: -1.3% min: -2.7% max: -0.1%
crates.io
avg: -1.4% min: -2.7% max: -0.3%
encoding-opt
avg: -1.1% min: -2.5% max: 0.1%
encoding
avg: -1.3% min: -2.4% max: -0.3%
hyper-check
avg: -1.7% min: -2.3% max: -0.9%
regex-check
avg: -1.5% min: -1.9% max: -0.7%
piston-image-check
avg: -0.9% min: -1.8% max: -0.5%
hyper
avg: -1.0% min: -1.7% max: -0.3%
hyper-opt
avg: -0.9% min: -1.7% max: -0.1%
syn-check
avg: -1.0% min: -1.5% max: -0.6%
clap-rs
avg: -0.3% min: -1.5% max: 0.2%
regex-opt
avg: -0.6% min: -1.5% max: -0.0%
regression-31157-check
avg: -1.1% min: -1.4% max: -0.7%
regex
avg: -0.7% min: -1.3% max: -0.1%
clap-rs-check
avg: -0.5% min: -1.2% max: 0.1%
syn-opt
avg: -0.5% min: -1.1% max: -0.1%
syn
avg: -0.5% min: -1.1% max: -0.2%
serde-opt
avg: -0.3% min: -1.1% max: 0.1%
piston-image-opt
avg: -0.4% min: -1.1% max: -0.0%
piston-image
avg: -0.4% min: -1.0% max: -0.0%
```
|
|
So that 55 entries (at 48 bytes each) don't need to be eagerly
initialized on creation.
This speeds up numerous rust-perf benchmark runs, by up to 3%.