Issue #889 has been updated by caleb clausen.


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). 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. 

However, other systems (notably windows, perhaps macos?) might not have such a good realloc available to them. If so, there might be a larger improvement to be seen on those platforms, which could make this change (and #905) worthwhile just for the sake of those platforms.

Does someone using macos or (especially) windows want to post some performance numbers for this patch?
----------------------------------------
http://redmine.ruby-lang.org/issues/show/889

----------------------------------------
http://redmine.ruby-lang.org