2 ms·
Glad you enjoyed it :) And yeah, under the hood those other languages do all kinds of wild optimizations with their "immutable" strings like sharing substrings
by brundolf 6y ago
Glad you enjoyed it :)
And yeah, under the hood those other languages do all kinds of wild optimizations with their "immutable" strings like sharing substrings between different strings and pooling to reduce allocations. I intentionally left out those nuances because from the user's perspective, those are all implementation details (even if they can surface in the form of performance changes).