News for hackers. Stuff that matters.
Re:An overengineered solution to `sort | uniq -c` with 25x t... by dbdr on Monday October 27, 2025 @02:59AM (#45718108)
> using csv (serde) for writing leads to some big gains

Could you explain that, if you have the time? Is that for writing the output lines? Is actual CSV functionality used? That crate says "Fast CSV parsing with support for serde", so I'm especially confused how that helps with writing.

Re:An overengineered solution to `sort | uniq -c` with 25x t... by LtdJorge on Monday October 27, 2025 @07:29AM (#45719737)
Yes, it’s used just for writing
Re:An overengineered solution to `sort | uniq -c` with 25x t... by noamteyssier on Tuesday October 28, 2025 @12:49PM (#45735305)
Yeah I'm using it to serialize the output lines as a TSV. Rust's `println!` is notoriously slow and using `csv` to serialize the output is a nice way to boost throughput
Re:An overengineered solution to `sort | uniq -c` with 25x t... by dbdr on Wednesday October 29, 2025 @03:07AM (#45743560)
Thanks. Nice find! Though it feels weird to have to use a csv crate for that. Ideally the `fast printing` part should be understood, and either used directly, or extracted as a separate, smaller crate.