Within that constraint, I'm hoping to get as much read throughput as possible. I believe this means my reads need to be sequential, but I expect that the details of IO queueing and prefetching are important here, and I don't know those details. For that reason, I don't think something like "memory-map the file and use many threads to divide-and-conquer the mapped buffer" going to work for me. My main constraint is that I don't want my program to cause pathological thrashing issues if the file happens to be on a spinnig disk. Let's say I'm going to perform some trivial computation on the data, something easily parallelizable and not CPU-bound, like adding all the bytes together. I want to read a file as quickly as possible, sort of like writing a cat clone, except that I don't actually need to write the data back out. This isn't necessarily a Rust-specific question, but I'm working in Rust, so hopefully it isn't too irrelevant to this sub :) We'll do our best to keep these links up to date, but if we fall behind please don't hesitate to shoot us a modmail.
#Rust reddit code#
We observe the Rust Project Code of Conduct. Strive to treat others with respect, patience, kindness, and empathy. Please read The Rust Community Code of Conduct The Rust Programming LanguageĪ place for all things related to the Rust programming language-an open-source systems language that emphasizes performance, reliability, and productivity.