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

portlist: add BenchmarkGetListIncremental #6028

Merged
merged 1 commit into from Oct 23, 2022
Merged

portlist: add BenchmarkGetListIncremental #6028

merged 1 commit into from Oct 23, 2022

Conversation

bradfitz
Copy link
Member

In contrast to BenchmarkGetList, this new BenchmarkGetListIncremental acts like what happens in practice, remembering the previous run and avoiding work that's already been done previously.

Currently:

BenchmarkGetList
BenchmarkGetList-8                           100          11011100 ns/op           68411 B/op       2211 allocs/op
BenchmarkGetList-8                           100          11443410 ns/op           69073 B/op       2223 allocs/op
BenchmarkGetList-8                           100          11217311 ns/op           68421 B/op       2197 allocs/op
BenchmarkGetList-8                           100          11035559 ns/op           68801 B/op       2220 allocs/op
BenchmarkGetList-8                           100          10921596 ns/op           69226 B/op       2225 allocs/op
BenchmarkGetListIncremental
BenchmarkGetListIncremental-8                168           7187217 ns/op            1192 B/op         28 allocs/op
BenchmarkGetListIncremental-8                172           7004525 ns/op            1194 B/op         28 allocs/op
BenchmarkGetListIncremental-8                162           7235889 ns/op            1221 B/op         29 allocs/op
BenchmarkGetListIncremental-8                164           7035671 ns/op            1219 B/op         29 allocs/op
BenchmarkGetListIncremental-8                174           7095448 ns/op            1114 B/op         27 allocs/op

Updates #5958

In contrast to BenchmarkGetList, this new BenchmarkGetListIncremental
acts like what happens in practice, remembering the previous run and
avoiding work that's already been done previously.

Currently:

    BenchmarkGetList
    BenchmarkGetList-8                           100          11011100 ns/op           68411 B/op       2211 allocs/op
    BenchmarkGetList-8                           100          11443410 ns/op           69073 B/op       2223 allocs/op
    BenchmarkGetList-8                           100          11217311 ns/op           68421 B/op       2197 allocs/op
    BenchmarkGetList-8                           100          11035559 ns/op           68801 B/op       2220 allocs/op
    BenchmarkGetList-8                           100          10921596 ns/op           69226 B/op       2225 allocs/op
    BenchmarkGetListIncremental
    BenchmarkGetListIncremental-8                168           7187217 ns/op            1192 B/op         28 allocs/op
    BenchmarkGetListIncremental-8                172           7004525 ns/op            1194 B/op         28 allocs/op
    BenchmarkGetListIncremental-8                162           7235889 ns/op            1221 B/op         29 allocs/op
    BenchmarkGetListIncremental-8                164           7035671 ns/op            1219 B/op         29 allocs/op
    BenchmarkGetListIncremental-8                174           7095448 ns/op            1114 B/op         27 allocs/op

Updates #5958

Change-Id: I1bd5a4b206df4173e2cb8e8a780429d9daa6ef1d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
@bradfitz bradfitz merged commit 774fa72 into main Oct 23, 2022
@bradfitz bradfitz deleted the bradfitz/portlist branch October 23, 2022 03:52
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.

None yet

2 participants