On 04/28/2012 03:17 AM, Matthieu Monrocq wrote:
I would also like to point out that if it's an implementation detail,
the actual representation might vary from known size to unknown size
without impact for the user, so starting without for the moment because
it's easier and refining it later is an option. Another option is to
have a fixed size with an alternative representation using something
similar to SSO (Short String Optimization); that is small
vectors/strings allocate their storage in place while larger ones push
their storage to the heap to avoid trashing the stack.

We tried this once. It was a disaster in terms of code size; you really don't want all strings and vectors doing this.

Patrick
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to