From: Kornelius Kalnbach Date: 2010-03-05T01:37:13+09:00 Subject: [ruby-core:28474] Re: [Feature #905] Add String.new(fixnum) to preallocate large buffer Doesn't Ruby allocate already using a "double memory if you run out" rule? That makes string concatenation (amortized) linear, even if the string must be moved in the memory. I doubt that there are real-world use cases that would be much faster with preallocation. As Yusuke said, ERb is more of a counter-example. Even with this API extension, we wouldn't have control over the generation of the string buffer in many use cases, as in Array#join, String#% or in literals using #{}. Its use would be limited to String#<<. [murphy]