mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
pack.c: remove wasted allocation in BER integer packing
The 'w' format (BER compressed integer) was allocating an empty string with rb_str_new(0, 0) then immediately overwriting it with the correctly-sized allocation. Remove the wasted first allocation. ~50% improvement on BER pack benchmarks.
This commit is contained in:
parent
3363861a5a
commit
a071078e90
Notes:
git
2026-01-11 12:43:04 +00:00
Loading…
x
Reference in New Issue
Block a user