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

perf: strip extra iteration when initialising ObjectAsVec #29

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

meskill
Copy link
Contributor

@meskill meskill commented Oct 30, 2024

A small performance boost when not using cowkeys feature to straight use the passed Vec instead of recreating it again

@PSeitz
Copy link
Owner

PSeitz commented Oct 31, 2024

Thanks! I considered this a convenience method for test code, what's your use case?

@PSeitz PSeitz merged commit 6ad7127 into PSeitz:main Oct 31, 2024
1 check passed
@meskill
Copy link
Contributor Author

meskill commented Nov 1, 2024

Thanks! I considered this a convenience method for test code, what's your use case?

we construct new serde_json_borrow::Value to generate the response and it's slightly more performant to create Vec with values first and create the ObjectAsVec from it without additional steps

@meskill meskill deleted the perf/object-vec-initializer branch November 1, 2024 19:56
@tusharmath
Copy link

@PSeitz can we have a quick release with this feature.

@PSeitz
Copy link
Owner

PSeitz commented Nov 2, 2024

published with 0.7.1

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.

3 participants