Skip to content

Conversation

@byroot
Copy link

@byroot byroot commented Dec 11, 2025

cc @gmalette two commits that can interest you.

First one heavily simplify the C code and makes it a bit faster. It also unify the two branches (keyword and positional).

Second commit is basically the same code but in Ruby. It performance slightly worse than the "naive positional" but I suspect it performs better than the "naive keywords". So it may be attractive to keep using keywords in your code but have better serialization perf.

It also bypass constructors, like Marshal would, which for a serializer is more correct and robust.

Very sligthly slower than naive positional, but work with
both positional and keyword structs.
Saves a few allocations. Mostly helps on smaller
payloads, as the cost of building the unpacker is quite high.
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