From: Yusuke ENDOH Date: 2010-03-26T21:27:56+09:00 Subject: [ruby-core:29033] Re: [Feature #889] erb.rb should use Array and << for eoutvar and not String and concat Hi, > Yusuke, as I read it, your numbers show a very slight improvement, (perhaps not statistically significant?) for the proposed change (and even slighter degradation versus a variant of the status quo). Agreed. Though I believe it is actually improved (I confirmed by running each configuration ten times), the improvement is subtle. > My recollection from the discussion of the other bug you cite, #905, was that the looked-for performance gain was not there because (at least in part) the implementation of realloc on linux is particularly smart, making use of memory mapping to avoid copying large buffers. It is true when ERB generates string as big as page size (4KB in many platform). But benchmark/bm_app_erb.rb generates just 247 bytes in each iteration. So there may be a chance to improve it against the benchmark. -- Yusuke Endoh