From: Motohiro KOSAKI <kosaki.motohiro@...>
Date: 2012-01-12T02:46:55+09:00
Subject: [ruby-core:42059] [ruby-trunk - Feature #5875][Closed] Couple of tiny changes to string


Issue #5875 has been updated by Motohiro KOSAKI.

Status changed from Open to Closed

Closed by reporter's request.

----------------------------------------
Feature #5875: Couple of tiny changes to string
https://bugs.ruby-lang.org/issues/5875

Author: Yura Sokolov
Status: Closed
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


*   change capacity increment from (capa + 1) * 2 to capa * 2 + 1
    previous increment formula leads to inconvenient allocation patterns: 25bytes, 51bytes, etc 
    new formula leads to more comfortable allocation pattern: 24b, 48b, 96b
*   change STR_BUF_MIN_SIZE from 128 to 79
    128 leads to allocation of 129 bytes, which is very uncomfortable for allocators and unnecessary large.
    (during Redmine startup this method is called about 3000000 times with capa < 128)

https://github.com/ruby/ruby/pull/80
https://github.com/funny-falcon/ruby/commit/2240a04d49118d9fa6f038655dac27f0ad96ed6b.patch


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