Re:Never create Ruby strings longer than 23 characters
by vidarh on Thursday December 12, 2013 @04:04AM
(#6893542)
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.
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.