Skip to content
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

Fix a performance bug when deserializing C arrays #758

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zainryan
Copy link

@zainryan zainryan commented Jul 3, 2022

Without the proposed change, cereal will deserialize the C-array using the slow-path serializeArray(), i.e., the one that deserializes the array element by element, even though the array is arithmetic.

Without the proposed change, cereal will deserialize the C-array using the slow-path serializeArray(), i.e., the one that deserializes the array element by element, even though the array is arithmetic.
@zainryan
Copy link
Author

zainryan commented Oct 9, 2022

Can anyone have a quick review on this? It makes a big performance difference in my use case.

@AzothAmmo
Copy link
Contributor

I think the proper fix for this would for us to define separate load and save functions checking either is_input_serializable or is_output_serializable. For your use case, it is on that this is not symmetric and makes me think there is a deeper issue either in your code or something wrong in cereal.

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.

2 participants