-
Notifications
You must be signed in to change notification settings - Fork 753
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
trie: Rewrite findPath without async-promise-executor #3015
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Results look great (and code looks good to me to). Any idea why there is such a performance gain on lower iterations?
Actually, I ran the benchmarks locally on both this branch and master and I can't reproduce the faster numbers, though maybe that's just my laptop. Regardless, it doesn't appear to perform any worse. |
Not really 🤷 |
No worries. Was just curious if there was some performance benefit to reviewing the async promise executor. |
i want to make sure you also see / approve of this change |
Nice, yeah, looks good! 🙏🙂👍 |
Followup to #2962 (shelved)
This takes the frist step towards simplifying and improving
trie.findPath()
.While the logic is fundamentally the same, this refactors
findPath
without theasync-promise-executor
API, and uses theasync/await
syntax directly to achieve the same result. Theresolve
andreject
calls have been replaced withreturn
andthrow
respectively.