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

criterion: cuprate-helper #322

Closed
wants to merge 22 commits into from
Closed

Conversation

hinto-janai
Copy link
Contributor

What

Adds initial Criterion benchmarks for cuprate-helper in benches/criterion/cuprate-helper.

Only the actively used pure functions are tested for now.

Requires #196.

@github-actions github-actions bot added A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-workspace Changes to a root workspace file or general repo file. A-docs Related to documentation. A-benches Related to benchmarks. A-books Related to Cuprate's books. A-book-architecture Related to the Architecture book. labels Oct 19, 2024
this `cfg()` existing makes a regular workspace `cargo b` fail
@hinto-janai
Copy link
Contributor Author

hinto-janai commented Oct 25, 2024

Initial results.

cargo bench -p cuprate-criterion-helper
benchmark average time per call
integer 1.2848 ns
unsigned 1.2876 ns
combine_low_high_bits_to_u128 846.72 ps
split_u128_into_low_high_bits 647.49 ps
timelock_to_u64 1.6886 ns
u64_to_timelock 1.7356 ns
cmp_float 1.0841 ns
cmp_float_nan 659.60 ps
get_mid 3.9615 ns
median 55.030 ns
tx_fee 6.9573 ns

@github-actions github-actions bot removed A-docs Related to documentation. A-books Related to Cuprate's books. A-book-architecture Related to the Architecture book. labels Nov 28, 2024
@hinto-janai
Copy link
Contributor Author

See #354.

@hinto-janai hinto-janai closed this Dec 3, 2024
@hinto-janai hinto-janai deleted the helper-bench branch December 4, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-benches Related to benchmarks. A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-workspace Changes to a root workspace file or general repo file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant