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
Having a mutable CompactStr is great since it can be a drop-in replacement of String.
However, the original immutable CompactStr provides O(1) clone, which is super useful for immutable string, which is also super useful.
One of the issue with immutable CompactStr is that it makes #16 harder without performance penalty, as std::sync::Arc does not have stable API for MaybeUninit.
But that can be solved with triomphe::Arc as it provides new_uninit_slice methods for creating an uninitialized slice, which makes implementation of #16 possible without any performance penalty.
Also triomphe::Arc is 8 bytes smaller than std::sync::Arc, as it does not support weak reference, which is not used in this crate.
The text was updated successfully, but these errors were encountered:
Having a mutable
CompactStr
is great since it can be a drop-in replacement ofString
.However, the original immutable
CompactStr
providesO(1)
clone, which is super useful for immutable string, which is also super useful.One of the issue with immutable
CompactStr
is that it makes #16 harder without performance penalty, asstd::sync::Arc
does not have stable API forMaybeUninit
.But that can be solved with
triomphe::Arc
as it providesnew_uninit_slice
methods for creating an uninitialized slice, which makes implementation of #16 possible without any performance penalty.Also
triomphe::Arc
is8
bytes smaller thanstd::sync::Arc
, as it does not support weak reference, which is not used in this crate.The text was updated successfully, but these errors were encountered: