From: Kornelius Kalnbach Date: 2010-03-06T10:25:48+09:00 Subject: [ruby-core:28526] Re: [Feature #905] Add String.new(fixnum) to preallocate large buffer On 06.03.10 01:31, Kurt Stephens wrote: > ERB template rendering is one of my greatest performance issues right now. Have you really identified String concatenation as the primary issue? There's so much more going on when building a template (especially in Rails). Somehow, my feeling is that the actual concatenation of a small string takes even less time than the calling overhead of String#<< (accessing self, method lookup, checking arguments, returning the recipient, ...) We could be talking about, say, 2% of the time your template needs to compile. By the way, fact check: ERb really uses String#<<, right? [murphy]