-
Notifications
You must be signed in to change notification settings - Fork 11.9k
[ISSUE#9435]:Flow control optimization #9434
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
base: develop
Are you sure you want to change the base?
Conversation
…every 1000 times versus every 1024 times. However, changing 1000 to 1024 allows replacing the modulo operation with a bitwise AND operation, which can achieve a performance optimization in every calculation cycle.
使用JMH基准测试,两种场景:平均耗时,每秒吞吐, |
吞吐还有耗时的提升大概都在2%左右 avgt: |
I think there is no significant difference between logging a warning every 1000 times versus every 1024 times. However, changing 1000 to 1024 allows replacing the modulo operation with a bitwise and operation, which can achieve a performance optimization in every calculation cycle, Thank you for your patience in reviewing this。
Which Issue(s) This PR Fixes
Fixes #9435
Brief Description
How Did You Test This Change?