Skip to content

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
@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