-
Notifications
You must be signed in to change notification settings - Fork 291
Use Builder directly instead of Put for serialization
#5919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`Put` is just an inefficient wrapper, and directly using `Builder` can make a big difference when serializing a lot of small things.
|
Ah bummer slash cool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am good with merging once CI passes. I think this is a nice improvement even if it's not orders of magnitude better.
Going through list for the latter seems especially ill advised
|
Finally tracked down the compilation problem. I was serializing just the utf8 strings without their lengths for e.g. version when compiling. |
Became unused in the serialization rewrite, but remains potentially useful.
|
All base tests passed before the merge with trunk. Think this is ready to go. |
This switches from using
Putin serialization to directly usingBuilder. The former is essentially just((), Builder), and I don't think that will get completely optimized away.In a microbenchmark, this was a massive difference (around 10x). However, for actual unison values, the difference seems much less significant. It's around 2x better on things like lists of pairs, or maps of numbers. I've been looking for some additional performance gain tweaks, but haven't found any yet.