GregoryConrad / rearch-rs

Re-imagined approach to application design and architecture
https://crates.io/crates/rearch
MIT License
81 stars 4 forks source link

Try wrapping data values in Arc for faster container writes #11

Closed GregoryConrad closed 9 months ago

GregoryConrad commented 9 months ago

Would need to benchmark to confirm speed improvements.

GregoryConrad commented 9 months ago

If we attempt this, which would likely increase write speeds of the container, we could also subsequently consider:

GregoryConrad commented 9 months ago

My hypothesis was right, but not to the degree I thought it would be (but still noticeable). For 100,000,000 writes:

Without Arc (seconds) With Arc (seconds)
84.30227725 78.870126334

Which represents a 6.4% improvement, so I'll keep the change and spin off the possibility of removing the Clone restriction in a new issue.