-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
use binary search to optimize performance #820
Conversation
60f1bbd
to
311b498
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.
Thanks!
Since binary search can be tricky to implement in some cases (e.g., https://ai.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html), can we please add some unit tests for this?
Ok, I will add tests. |
311b498
to
0e8d2e4
Compare
I added some tests, the previous code and the current code have passed. And I prevents overflow at the same time.
PTAL, thanks! @kkourt |
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.
Thanks!
I believe that the correct behavior if a user requests the address of a symbol is to return this symbol with an offset of zero.
Could you also add a Signed-off-by with a real name? See: https://docs.cilium.io/en/v1.13/contributing/development/contributing_guide/#dev-coo
0e8d2e4
to
1532955
Compare
1532955
to
ce76223
Compare
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Signed-off-by: Changsheng Huang <1984737645@qq.com>
ce76223
to
539c9e4
Compare
Sure! |
I added a Signed-off-by with a real name. |
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.
LGTM, thanks!
Use binary search to optimize performance in pkg/ksyms/ksyms.go