Instead of using byteslice and then using unpack1, we can pass the
offset to unpack1 and skip allocating a string.
This option was added in Ruby 3.1, which seems fine since CI only tests
as old as 3.2.
I regenerated stuff under lib/protoboeuf/protobuf/ so it picks up the new changes. Other files might be stale too since there are more changes than what I touched.
Instead of using
byteslice
and then usingunpack1
, we can pass the offset tounpack1
and skip allocating a string. This option was added in Ruby 3.1, which seems fine since CI only tests as old as 3.2.I regenerated stuff under
lib/protoboeuf/protobuf/
so it picks up the new changes. Other files might be stale too since there are more changes than what I touched.Gives a decent boost:
Before:
After: