diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-01-26 06:36:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 06:36:37 +0100 |
| commit | cfa583b3880e95016d4cf79fa94f2c73685792d8 (patch) | |
| tree | 566d7be81b6387ec82b2910021a6ddf326283aa4 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 912877d009d5c7187412698f23f35881d0a64dbe (diff) | |
| parent | 1b9a01340b50cf015ec99519814628d6a28b7cfa (diff) | |
| download | rust-cfa583b3880e95016d4cf79fa94f2c73685792d8.tar.gz rust-cfa583b3880e95016d4cf79fa94f2c73685792d8.zip | |
Rollup merge of #120053 - AldanTanneo:specialize-stdinlock-bytes, r=the8472
Specialize `Bytes` on `StdinLock<'_>` I noticed recently, while profiling a little project, that I was spending a lot of time reading from stdin (even with locking). I was using the `.bytes()` iterator adaptor; I figured, since `StdinLock` is a `BufReader` internally, it would work just as fast. But this is not the case, as `Bytes` is only specialized for the raw `BufReader`, and not the `StdinLock`/`MutexGuard` wrapper. Performance improved significantly when I wrapped the lock in a new `BufReader`, but I was still a bit sore about the double buffer indirection. This PR attempts to specialize it, by simply calling the already specialized implementation on `BufReader`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
