What is Nostr?
Mo :ferris: :tux: @ FOSDEM /
npub1j7f…mapy
2024-08-29 00:10:02

Mo :ferris: :tux: @ FOSDEM on Nostr: #RustLang performance tip 🚀 Rewinding, truncating and then writing to an open file ...

#RustLang performance tip 🚀

Rewinding, truncating and then writing to an open file is always faster than opening the file every time.

For small files, it can be about 3x faster.

If you write a file multiple times, keep it open and reuse it, but don't forget to rewind and truncate.

Shouldn't be specific to Rust.



Author Public Key
npub1j7fc87rk03whjh72mphc9hrm8zecfsdywdcscsesznwzcrasudvs75mapy