Hi,

> Yusuke, as I read it, your numbers show a very slight improvement, (perha=
ps not statistically significant?) for the proposed change (and even slight=
er 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 par=
t) 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.

--=20
Yusuke Endoh <mame / tsg.ne.jp>