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-database #324

Closed
wants to merge 24 commits into from
Closed

Conversation

hinto-janai
Copy link
Contributor

What

Adds Criterion benchmarks for cuprate-database in benches/criterion/cuprate-database.

@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 21, 2024
@hinto-janai hinto-janai mentioned this pull request Oct 21, 2024
this `cfg()` existing makes a regular workspace `cargo b` fail
@hinto-janai hinto-janai mentioned this pull request Oct 23, 2024
28 tasks
@github-actions github-actions bot added the A-storage Related to storage. label Oct 24, 2024
@hinto-janai
Copy link
Contributor Author

Initial results.

  • Time values are time per function call
  • redb values are only shown for >3% diffs
  • code formatting is faster
benchmark heed redb diff
ro_get 24.193 ns 21.809 ns -9.98%
ro_len 4.2254 ns
ro_first 29.797 ns
ro_last 31.675 ns 33.186 ns +4.39%
ro_is_empty 7.6418 ns
ro_contains 22.448 ns 21.696 ns -3.96%
rw_get 23.204 ns 22.107 ns -4.63%
rw_len 4.6742 ns 4.4666 ns -4.63%
rw_first 31.337 ns
rw_last 33.221 ns 34.402 ns +3.90%
rw_is_empty 7.7049 ns
rw_contains 22.874 ns 22.017 ns -3.72%
get_range 1.6075 µs
iter 1.9882 µs 1.9254 µs -3.54%
keys 766.35 ns
values 1.5660 µs
put 3.2995 µs 3.5970 µs +8.76%
delete 422.90 ns
pop_first 313.42 ns 286.33 ns -8.70%
pop_last 329.65 ns 305.60 ns -7.11%
take 4.8301 µs
env_inner 3.7474 ns
tx_ro 77.387 ns 65.183 ns -15.73%
tx_rw 33.163 ns 35.133 ns +6.00%
open_db_ro 18.273 ns
open_db_rw 17.722 ns
create_db 18.222 ns
resize 15.658 µs
current_map_size 4.2498 ns
disk_size_bytes 2.2181 µs
pre_rct_output_id_as_bytes 649.28 ps
pre_rct_output_id_from_bytes 782.82 ps
output_as_bytes 650.27 ps
output_from_bytes 5.8138 ns

@hinto-janai
Copy link
Contributor Author

See #354.

@hinto-janai hinto-janai closed this Dec 3, 2024
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-storage Related to storage. 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