-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactor Resource.resolve to avoid linear search of methods #9899
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #9899 +/- ##
==========================================
- Coverage 98.71% 98.71% -0.01%
==========================================
Files 119 119
Lines 36386 36385 -1
Branches 4323 4322 -1
==========================================
- Hits 35918 35917 -1
Misses 315 315
Partials 153 153
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #9899 will not alter performanceComparing Summary
|
|
To get a better idea how much of a speed up #9899 will be
4d2ce88
to
3f401b5
Compare
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.
Looks good.
Regarding or
vs getting with default -- up to you.
Getting with the default looks a little better, the speed on macro benchmark should be roughly the same I guess.
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 2249f2d on top of patchback/backports/3.11/2249f2d59d30b7992e3a2ea25ab790c6f621b5cb/pr-9899 Backporting merged PR #9899 into master
🤖 @patchback |
Backport to 3.12: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 2249f2d on top of patchback/backports/3.12/2249f2d59d30b7992e3a2ea25ab790c6f621b5cb/pr-9899 Backporting merged PR #9899 into master
🤖 @patchback |
(cherry picked from commit 2249f2d)
(cherry picked from commit 2249f2d)
…linear search of methods (#9908)
…linear search of methods (#9909)
The average time complexity of
Resource.resolve
is nowO(1)
instead ofO(number_of_methods)
#2779 (comment)
Looks to be
~14% faster with a single method
~2.5x faster for the multiple methods