Skip to content

More arity splitting#8053

Merged
headius merged 24 commits intojruby:masterfrom
headius:more_arity_splitting
Jan 4, 2024
Merged

More arity splitting#8053
headius merged 24 commits intojruby:masterfrom
headius:more_arity_splitting

Conversation

@headius
Copy link
Member

@headius headius commented Dec 22, 2023

Splitting some methods likely to be used a lot.

@headius headius force-pushed the more_arity_splitting branch from a1ab000 to 18432dc Compare January 3, 2024 17:18
@headius headius added this to the JRuby 9.4.6.0 milestone Jan 3, 2024
headius added 10 commits January 3, 2024 16:47
Hash.new with default is fairly common.
Some of these could be zero-allocation with a bit more work, but
this at least removes one array. copy_stream from IO to IO is just
about as close to alloc-free as we can make it.
Frequently used with a frozen literal string and doing no other
allocation. This makes it alloc-free in such cases.
It redispatches to Proc#curry, which currently is in Ruby and
still boxes the arguments, but we're kicking the can down the road
a bit.
@headius headius force-pushed the more_arity_splitting branch from 53ff1f2 to 526d764 Compare January 4, 2024 17:46
@headius headius marked this pull request as ready for review January 4, 2024 19:21
@headius headius merged commit c8b5e07 into jruby:master Jan 4, 2024
@headius headius deleted the more_arity_splitting branch January 4, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant