Hacker News new | ask | show | jobs
by vidarh 4567 days ago
It's not arbitrary. It is the length available when taking the space the String objects must have in order to be able to handle strings allocated on the heap.

And I could write books about why Rails is such a pain to optimize but this is not it: This is an optimisation over the generic case of allocating the buffer elsewhere. An optimisation you also happens to find in C++ implementations for example.