-
Notifications
You must be signed in to change notification settings - Fork 27
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
Serialize compiled instructions with serde #9
Comments
I've actually had a test case where I wanted to send already compiled instructions over the network and ended up implementing this, pulling in |
Hmm, that's really interesting. I guess I assumed that it would be more performant to just save/transfer the original String expression, and then re-parse it on the other side. As you have already figured out, the instructions are tied to the slab, and it takes quite a bit of memory copies and I/O to serialize all those things and save them to a file or send them across a network. Sending the expression string would be way easier, and fasteval parsing is so fast, I had assumed that for most use cases, it would be the right choice. I'll definitely think about this more, and I'll run some tests. If it's really more performant to serialize compiled expressions, I can definitely support that. Your code will be a great foundation. Thanks! |
From what I've seen in terms of performance, doing some very preliminary benchmarks, deserializing a compiled |
Of course by saying it's faster I only mean the receiver side, not the combined sender and receiver. Main idea here being that a sender only has to serialize once, which can maybe save some processing time spend by the whole system if there were more than 1 receivers. |
For some use cases it may be useful to be able to serialize and deserialize compiled
Instruction
s, along withSlab
s. Perhaps this could become an optional feature?The text was updated successfully, but these errors were encountered: