https://github.com/orhun/rust-stdout-vs-stderr
Benchmarks for comparing the speed of stdout vs stderr & code snippets for my blog post.
https://github.com/orhun/rust-stdout-vs-stderr
comparison io rust stderr stderr-stream stdout stdout-stream
Last synced: 3 months ago
JSON representation
Benchmarks for comparing the speed of stdout vs stderr & code snippets for my blog post.
- Host: GitHub
- URL: https://github.com/orhun/rust-stdout-vs-stderr
- Owner: orhun
- License: apache-2.0
- Created: 2024-01-04T23:48:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-04T18:36:15.000Z (7 months ago)
- Last Synced: 2025-04-16T00:07:29.060Z (3 months ago)
- Topics: comparison, io, rust, stderr, stderr-stream, stdout, stdout-stream
- Language: Rust
- Homepage: https://blog.orhun.dev/stdout-vs-stderr
- Size: 188 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `stdout` vs `stderr` ⚔️
✨ Read the blog post: [**https://blog.orhun.dev/stdout-vs-stderr**](https://blog.orhun.dev/stdout-vs-stderr)

This repository contains the following Rust scripts:
- [`stdout-vs-stderr-all.rs`](./src/stdout-vs-stderr-all.rs) (**default**): Rendering comparison for stdout and stderr using unbuffered / line-buffered / block-buffered writes
- [`simple-tui.rs`](./src/simple-tui.rs): A simple TUI application built with [Ratatui](https://ratatui.rs/) & [Crossterm](https://github.com/crossterm-rs/crossterm)
- [`stdout-vs-stderr.rs`](./src/stdout-vs-stderr.rs): Measuring FPS for stdout and stderr
- [`stdout-vs-stderr-profiler.rs`](./src/stdout-vs-stderr.rs): Profiling stdout and stderr
- Also see [`run-profiler.sh`](./run-profiler.sh)
- [`linewriter.rs`](./src/writer/linewriter.rs): `LineWriter` example
- [`bufwriter.rs`](./src/writer/bufwriter.rs): `BufWriter` example
- [`block-buffered-stdout.rs`](./src/writer/block-buffered-stdout.rs): Stdout with `BufWriter`
- [`raw-stdout-broken`](./src/unbuffered/raw-stdout-broken.rs): Broken example of unbuffered stdout
- [`raw-stdout-1`](./src/unbuffered/raw-stdout-1.rs): Unbuffered stdout
- [`raw-stdout-2`](./src/unbuffered/raw-stdout-2.rs): Unbuffered stdout (alternative)
- [`snowfall.rs`](./src/bonus/snowfall.rs): Happy new year!## License
[](./LICENSE-MIT)
[](./LICENSE-APACHE)Licensed under either of [Apache License Version 2.0](./LICENSE-APACHE) or [The MIT License](./LICENSE-MIT) at your option.
🦀 ノ( º \_ º ノ) - respect crables!
## Copyright
Copyright © 2024, [Orhun Parmaksız](mailto:[email protected])