Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Oct 13, 2025

Performance Improvements
O(1) lookup instead of O(n) for getFromHistory()
O(1) update instead of O(n) removal + O(1) addition
Eliminates redundant iteration and equality checks

Before

Benchmark Type Mode Score Units
ClientJavaBenchmark.testSwitcherRemoteThrottle Async thrpt 40,171,215.842 ops/s

After

Benchmark Type Mode Score Units
ClientJavaBenchmark.testSwitcherRemoteThrottle Async thrpt 81,740,118.612 ops/s

@petruki petruki added this to the v2.5.2 milestone Oct 13, 2025
@petruki petruki self-assigned this Oct 13, 2025
@petruki petruki added the enhancement New feature or request label Oct 13, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 0cb67e9 into master-2 Oct 13, 2025
9 checks passed
@petruki petruki deleted the staging branch October 13, 2025 21:42
petruki added a commit that referenced this pull request Oct 13, 2025
petruki added a commit that referenced this pull request Oct 13, 2025
* feat: improved async performance by 2x (#377)

* fix-test: SwitcherThrottleTest

* Revert "fix-test: SwitcherThrottleTest"

This reverts commit e347a68.

* fix-test: set order for SwitcherThrottleTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants