You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i was searching for why Arc was used after my overnight test shown additional allocation tracing back to the Arc in Multiaddr (probably unrelated, though it did catch my eye). The previous commit that made the change did not mention the reason for using it, and looking over the code, removing the Arc should work just fine and without being a breaking change.
The text was updated successfully, but these errors were encountered:
I believe the idea is that it is cheap to clone. The Multiaddr::push function for example uses clone-on-write to either reuse the current allocation if there are no other copies or make a new one on the fly.
I've made pull request #89 to preserve the cheap clone while making the semantics clearer and improving (hopefully, still benchmarking) efficiency by using an EcoVec<u8>, downside is it adds a dependency on https://github.com/typst/ecow
i was searching for why
Arc
was used after my overnight test shown additional allocation tracing back to theArc
inMultiaddr
(probably unrelated, though it did catch my eye). The previous commit that made the change did not mention the reason for using it, and looking over the code, removing theArc
should work just fine and without being a breaking change.The text was updated successfully, but these errors were encountered: