[rubygems/rubygems] Aggressively optimize allocations in SafeMarshal
Reduces allocations in a bundle install --full-index by an order of magnitude
Main wins are (a) getting rid of exessive string allocations for exception message stack
(b) Avoiding hash allocations caused by kwargs for #initialize
(c) avoid using unpack to do bit math, its easy enough to do by hand
(d) special case the most common elements so they can be read without an allocation
(e) avoid string allocations every time a symbol->string lookup is done by using symbol#name
https://github.com/rubygems/rubygems/commit/7d2ee51402
[rubygems/rubygems] Aggressively optimize allocations in SafeMarshal
Reduces allocations in a bundle install --full-index by an order of magnitude
Main wins are (a) getting rid of exessive string allocations for exception message stack
(b) Avoiding hash allocations caused by kwargs for #initialize
(c) avoid using unpack to do bit math, its easy enough to do by hand
(d) special case the most common elements so they can be read without an allocation
(e) avoid string allocations every time a symbol->string lookup is done by using symbol#name
https://github.com/rubygems/rubygems/commit/7d2ee51402