Skip to content
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

Faster path to check an IP address against known networks #3142

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

bboreham
Copy link
Collaborator

We modify the critbitgo library to skip creating a route object we don't use.

The weaveworks-local modification can be removed if k-sone/critbitgo#7 is merged.

Benchmarks (fastest of 10 runs; timings are highly variable):

benchmark                         old ns/op     new ns/op     delta
BenchmarkRenderList-2             593307328     555257029     -6.41%
BenchmarkRenderHosts-2            433287444     394693695     -8.91%
BenchmarkRenderControllers-2      361384179     323186742     -10.57%
BenchmarkRenderPods-2             346144553     329953227     -4.68%
BenchmarkRenderContainers-2       201489916     200237356     -0.62%
BenchmarkRenderProcesses-2        135127597     123572216     -8.55%
BenchmarkRenderProcessNames-2     152146655     149658203     -1.64%

benchmark                         old allocs     new allocs     delta
BenchmarkRenderList-2             798184         610624         -23.50%
BenchmarkRenderHosts-2            603982         413645         -31.51%
BenchmarkRenderControllers-2      428532         284927         -33.51%
BenchmarkRenderPods-2             383885         240848         -37.26%
BenchmarkRenderContainers-2       253945         158539         -37.57%
BenchmarkRenderProcesses-2        119584         71915          -39.86%
BenchmarkRenderProcessNames-2     164045         116223         -29.15%

benchmark                         old bytes     new bytes     delta
BenchmarkRenderList-2             91234788      86609764      -5.07%
BenchmarkRenderHosts-2            65662378      60745008      -7.49%
BenchmarkRenderControllers-2      47002552      43220707      -8.05%
BenchmarkRenderPods-2             41884588      38159420      -8.89%
BenchmarkRenderContainers-2       28806560      26319518      -8.63%
BenchmarkRenderProcesses-2        13985787      12745817      -8.87%
BenchmarkRenderProcessNames-2     18001992      16745256      -6.98%

We modify the critbitgo library to skip creating a route object we don't use.

The weaveworks-local modification can be removed if
k-sone/critbitgo#7 is merged.
@bboreham bboreham merged commit 1455597 into master Apr 16, 2018
@bboreham bboreham deleted the faster-critbit branch April 16, 2018 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants