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: avoid unnecesary get() call and use faster approach for converting to string #14673

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

vkarpov15
Copy link
Collaborator

@vkarpov15 vkarpov15 commented Jun 17, 2024

Re: #14394

Summary

Turns out .toString() is significantly faster than String() for converting values to strings:

image

This PR gives us maybe 12% speedup on recursiveToObject benchmark with no breaking changes 😎

Examples

@vkarpov15 vkarpov15 changed the title perf: avoid unnecesary get() call and use faster approach for convert… perf: avoid unnecesary get() call and use faster approach for converting to string Jun 17, 2024
@vkarpov15 vkarpov15 added this to the 8.4.3 milestone Jun 17, 2024
@vkarpov15 vkarpov15 merged commit e7a6e31 into master Jun 18, 2024
46 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-14394-perf-jun17 branch June 18, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants