Skip to content

Conversation

vkarpov15
Copy link
Collaborator

Summary

Looking more closely at #14394, we actually call clone() on primitive values a lot in Mongoose. cloneObject(), for instance, calls clone() on every key.

This PR is looking like another maybe 10% speedup on recursiveToObject benchmark, 308ms average vs 345ms average.

Examples

@vkarpov15 vkarpov15 added this to the 8.5.2 milestone Jul 23, 2024
@vkarpov15 vkarpov15 merged commit f921c9a into master Jul 26, 2024
45 of 46 checks passed
@hasezoey hasezoey deleted the vkarpov15/perf-clone-primitives branch July 27, 2024 09:34
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