rust/library/core
Matthias Krüger f3f9f0c5e6
Rollup merge of #124551 - Swatinem:debug-str-bench, r=cuviper
Add benchmarks for `impl Debug for str`

In order to inform future perf improvements and prevent regressions, lets add some benchmarks that stress `impl Debug for str`.

---

As I am currently working on improving the perf in https://github.com/rust-lang/rust/pull/121150, its nice to have these benchmarks.

Writing them, I also saw that escapes are written out one char at a time, even though other parts of the code are already optimizing that via `as_str`, which I intend to do as well as a followup improvement.

r? ``@cuviper``
☝🏻 as you were also assigned to https://github.com/rust-lang/rust/pull/121150, CC ``@the8472`` if you want to steal the review :-)
2024-05-10 07:30:19 +02:00
..
benches Add benchmarks for impl Debug for str 2024-05-01 09:54:29 +02:00
src Auto merge of #124793 - scottmcm:simplify-as-chunks, r=Nilstrieb 2024-05-09 01:55:46 +00:00
tests Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
Cargo.toml Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00