From: Nikolai Weibull Date: 2010-03-04T18:03:01+09:00 Subject: [ruby-core:28463] Re: [Feature #905] Add String.new(fixnum) to preallocate large buffer On Thu, Mar 4, 2010 at 07:11, caleb clausen wrote: > Issue #905 has been updated by caleb clausen. > Do we really need a benchmark to confirm that copying large strings is expensive? Pre-sized buffers are a well-known performance win on other systems, so why not for ruby as well? Doesn���t this unnecessarily expose implementation details about String? Preallocation doesn���t make as much sense if Strings were implemented using, for example, Ropes [1]. [1] http://en.wikipedia.org/wiki/Rope_(computer_science)