1 comment

[ 0.31 ms ] story [ 10.3 ms ] thread
Neat!

This is commonly known as Small String / Small Buffer Optimization. This is how most implementations of C++'s std::string work also.