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

Use ahash for BUILTIN_INSTRUCTION_COSTS #2329

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Conversation

ksolana
Copy link

@ksolana ksolana commented Jul 29, 2024

Fixes: #2196

Bench results:

$ ./cargo nightly bench --manifest-path cost-model/Cargo.toml

@ksolana ksolana requested review from tao-stones and apfitzge July 29, 2024 06:12
@tao-stones
Copy link

Looks good, do you have bench results to share?

@ksolana
Copy link
Author

ksolana commented Jul 30, 2024

Benchmark Results

Baseline

test bench_hash_find ... bench:      30,955 ns/iter (+/- 756)
test bench_cost_model                       ... bench:   1,137,787 ns/iter (+/- 22,438)
test bench_cost_model_requested_write_locks ... bench:   1,174,591 ns/iter (+/- 12,127)
test bench_cost_tracker_contentious_transaction     ... bench:   1,831,908 ns/iter (+/- 122,044)
test bench_cost_tracker_non_contentious_transaction ... bench:   2,238,966 ns/iter (+/- 18,392)
test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out; finished in 2.60s

With changes

test bench_hash_find ... bench:      19,944 ns/iter (+/- 656)
test bench_cost_model                       ... bench:     817,650 ns/iter (+/- 25,232)
test bench_cost_model_requested_write_locks ... bench:     885,115 ns/iter (+/- 6,901)
test bench_cost_tracker_contentious_transaction     ... bench:   1,831,225 ns/iter (+/- 32,081)
test bench_cost_tracker_non_contentious_transaction ... bench:   2,246,248 ns/iter (+/- 113,709)

Copy link

@tao-stones tao-stones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding bench, and the results look promising

cost-model/Cargo.toml Outdated Show resolved Hide resolved
@ksolana ksolana force-pushed the ahashmap branch 3 times, most recently from c407097 to 40dbc12 Compare July 31, 2024 04:15
Copy link

@tao-stones tao-stones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ksolana ksolana merged commit 2fce82b into anza-xyz:master Jul 31, 2024
53 checks passed
@ksolana ksolana deleted the ahashmap branch July 31, 2024 21:28
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.

BUILT_IN_INSTRUCTION_COSTS: ahash
2 participants