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

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

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

Initial results.

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

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-book-architecture Related to the Architecture book. A-books Related to Cuprate's books. A-dependency Related to dependencies, or changes to a Cargo.{toml,lock} file. A-docs Related to documentation. 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