Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #50339 - nnethercote:lazy-Printer-buf, r=michaelwoerister
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% ```
- Loading branch information