Closed mhluska closed 1 year ago
Thank you for the comment. In general, LTO sometimes makes things dramatically faster, but sometimes it makes things worse. To understand why, we need to dive deep into Rust's complex build system.
I don't think there is much I can do here. Maybe we can switch to a different serialization library, but I think bincode is a very popular and reasonable library for our use case.
I'm noticing throughput of several MB per second when saving to file with some solutions (others work fine, yet others are slow at the beginning and fast towards the end of serialization). I'm using high end EC2 machines so it's unlikely to be a hardware limitation. I also have compression disabled.
I'm pretty sure the issue is the bincode v2 dependency: https://github.com/bincode-org/bincode/issues/618
When I add this to the Cargo.toml file, things serialize much faster: