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

Add more comprehensive benchmarks #54

Merged
merged 1 commit into from
Jun 9, 2023
Merged

Add more comprehensive benchmarks #54

merged 1 commit into from
Jun 9, 2023

Conversation

ureeves
Copy link
Member

@ureeves ureeves commented Jun 7, 2023

The blake3 insertion benchmark is rewritten to allow for measuring the time of multiple variable insertions. A new benchmark is also introduced that does the same as the insertion benchmark, but also computes the root of the tree at the end of the insertions.

Both of these benchmarks allow for accurate estimation of the root calculation from scratch, given a certain number of elements inserted.

These are the results on a AMD Ryzen 9 5950X (3.4 GHz base clock):

blake3_insert_n/10      time:   [6.5373 µs 6.5423 µs 6.5481 µs]
blake3_insert_n/100     time:   [73.387 µs 73.877 µs 74.377 µs]
blake3_insert_n/1000    time:   [1.1084 ms 1.1090 ms 1.1095 ms]
blake3_insert_n/10000   time:   [12.633 ms 12.789 ms 12.948 ms]

blake3_root_n/10        time:   [31.108 µs 31.271 µs 31.422 µs]
blake3_root_n/100       time:   [298.88 µs 298.93 µs 298.98 µs]
blake3_root_n/1000      time:   [3.0444 ms 3.0616 ms 3.0790 ms]
blake3_root_n/10000     time:   [31.971 ms 32.185 ms 32.420 ms]

@ureeves ureeves requested review from moCello and herr-seppia June 7, 2023 23:08
Copy link
Member

@moCello moCello left a comment

Choose a reason for hiding this comment

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

LGTM, just a naming suggestion but not blocking at all

Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

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

🚀

The `blake3` insertion benchmark is rewritten to allow for measuring
the time of multiple variable insertions. A new benchmark is also
introduced that does the same as the insertion benchmark, but also
computes the root of the tree at the end of the insertions.

Both of these benchmarks allow for accurate estimation of the root
calculation from scratch, given a certain number of elements inserted.

These are the results on a `AMD Ryzen 9 5950X` (3.4 GHz base clock):
```text
blake3_insert_n/10      time:   [6.5373 µs 6.5423 µs 6.5481 µs]
blake3_insert_n/100     time:   [73.387 µs 73.877 µs 74.377 µs]
blake3_insert_n/1000    time:   [1.1084 ms 1.1090 ms 1.1095 ms]
blake3_insert_n/10000   time:   [12.633 ms 12.789 ms 12.948 ms]

blake3_root_n/10        time:   [31.108 µs 31.271 µs 31.422 µs]
blake3_root_n/100       time:   [298.88 µs 298.93 µs 298.98 µs]
blake3_root_n/1000      time:   [3.0444 ms 3.0616 ms 3.0790 ms]
blake3_root_n/10000     time:   [31.971 ms 32.185 ms 32.420 ms]
```
@ureeves ureeves force-pushed the bench-lazy-root branch from caa557c to cebf645 Compare June 9, 2023 12:30
@ureeves ureeves merged commit 004068d into main Jun 9, 2023
@ureeves ureeves deleted the bench-lazy-root branch June 9, 2023 12:34
This was referenced Jun 23, 2023
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.

3 participants