granite-rust/library/std
Matthias Krüger cfa583b388
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`.
2024-01-26 06:36:37 +01:00
..
benches mv std libs to library/ 2020-07-27 19:51:13 -05:00
src Rollup merge of #120053 - AldanTanneo:specialize-stdinlock-bytes, r=the8472 2024-01-26 06:36:37 +01:00
tests Add test of thread_local containing multiline const block 2024-01-20 19:00:27 -08:00
build.rs zkvm: add partial std support 2024-01-22 10:15:11 -08:00
Cargo.toml Update compiler_builtins to 0.1.105 2024-01-09 20:30:56 -08:00