News for hackers. Stuff that matters.
Re:Go vs. Rust: Writing a CLI Tool by loopz on Tuesday August 04, 2020 @07:18AM (#24048788)
For a naive code solution, I found the default naive golang code to be better performing than Rust, when processing multiple files together (I/O-bound). I'd be careful assuming Rust is faster by default, as Go has some pretty sane defaults out of the box. The developer experience is faster, simpler and stabler(?) too, but really depend what you want to make. I find Rust interesting but haven't found the time/project to learn it properly on. Point being to avoid costs and risks of premature optimizations.
Re:Go vs. Rust: Writing a CLI Tool by steveklabnik on Tuesday August 04, 2020 @07:43AM (#24048941)
Often, slow file reading means that you didn't use a BufReader, and are making more system calls than you need to.
Re:Go vs. Rust: Writing a CLI Tool by kryps on Tuesday August 04, 2020 @08:34AM (#24049290)
Tip: Rust BufReaders default to 8KiB buffers which are way too small for high-performance sequential NVME I/O.