Is there a plan to have a small string and small vector optimisations, similar to fbvector and fbstring which offer significant performance improvements.
I’ve noted in my own production code in c++ projects that a lot of times the use case is a growable vector but the number of items ends up being within some reasonable bounds. In those cases having the flexibility to declare a vector to be stack allocated up to N : u32 elements but switch to heap when the logic demands transparently would be a performance win.
The std::string has small string optimisation but it’s too small at 16bytes fixed; the optimum size depends on the benchmarking for your use case, so a level of user control is needed. And std::vector missed a trick on this front so fbvector is used more.
I’ve seen one or two crates with this functionality but somewhat restricted due to other constraints. It would be great to see it in the std library behind the scenes, though perhaps with const fn it will be more doable.