Actions
Feature #5875
closedCouple of tiny changes to string
Description
- 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
Actions
Like0
Like0