1 comment

[ 5.5 ms ] story [ 15.5 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.