Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop using RArray::push in func call
Instead, use a Vec to hold the Values, and convert that Vec into a RArray for fewer calls into Ruby. Baseline (main): ``` Call host func (4 args) 505.454k (± 1.1%) i/s - 2.530M in 5.006521s Call host func (16 args) 413.965k (± 1.4%) i/s - 2.074M in 5.011759s Call host func (64 args) 241.831k (± 0.8%) i/s - 1.220M in 5.044257s Call host func (128 args) 124.092k (± 1.0%) i/s - 621.550k in 5.009287s Call host func (256 args) 48.621k (± 1.9%) i/s - 245.100k in 5.042940s ``` This commit: ``` Call host func (4 args) 518.697k (± 0.9%) i/s - 2.634M in 5.079016s Call host func (16 args) 443.826k (± 0.8%) i/s - 2.227M in 5.018984s Call host func (64 args) 272.471k (± 0.9%) i/s - 1.388M in 5.094768s Call host func (128 args) 142.090k (± 0.7%) i/s - 724.506k in 5.099148s Call host func (256 args) 56.107k (± 1.1%) i/s - 281.200k in 5.012444s ```
- Loading branch information