hipstr icon indicating copy to clipboard operation
hipstr copied to clipboard

Reconsider double allocation/indirection on allocated storage

Open arthurprs opened this issue 1 year ago • 2 comments

Even though double allocation/indirection allows for arguably simpler code and a lower-cost conversion from and into Strings (one allocation/deallocation is still required), it hurts creation and drop performance.

Clearly, this is a tradeoff, but I'd argue that string creation and drop are more prevalent than String/Vec conversion.

arthurprs avatar Mar 01 '25 21:03 arthurprs

My initial use case was String heavy but it's not the case anymore. Another way will be to add yet another representation (like tokio's bytes)...

Thinking about it.

polazarus avatar Mar 07 '25 13:03 polazarus

On the way.

polazarus avatar Apr 17 '25 13:04 polazarus