Hacker News new | past | comments | ask | show | jobs | submit login
How to write slow Rust code – Part 2 (athaydes.com)
6 points by jlledo on Aug 9, 2021 | hide | past | favorite | 2 comments



It's always sad to see someone get burnt by the internet, I wish him, and also those who criticised him, well.

On a brighter note, I appreciate the noob-friendly explanations. It made it really easy to follow along.

I'm also really curious about how Java achieves better stdout performance. I hope we get to apply the lessons to other environments too! I didn't read all of it, so perhaps there's a clue in @bugaevc's PR[1] mentioned in the article.

[1] https://github.com/renatoathaydes/prechelt-phone-number-enco...


[1] did in fact talk about and link to a Rust discussion PR[2] about the stdout perf issue. Essentially Rust always flushes stdout for every line of output, whereas other languages like Python tend to buffer larger blocks before flushing.

[2] https://github.com/rust-lang/rust/issues/60673




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: