Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinydancer-io/merkle-bench
This is a benchmark comparing merkle tree construction for receipts in Solana's consensus
https://github.com/tinydancer-io/merkle-bench
Last synced: about 24 hours ago
JSON representation
This is a benchmark comparing merkle tree construction for receipts in Solana's consensus
- Host: GitHub
- URL: https://github.com/tinydancer-io/merkle-bench
- Owner: tinydancer-io
- Created: 2023-07-28T10:15:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-05T09:29:54.000Z (about 1 year ago)
- Last Synced: 2023-10-05T21:11:15.355Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 350 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmarking Merkle Tree Construction for Receipts
This is a benchmark comparing merkle tree construction for receipts(Signature + Status). We are using two libraries for the comparison.
- [Solana-Merkle-Tree](https://crates.io/crates/solana-merkle-tree)
- [Firedancer bmtree32](https://github.com/firedancer-io/firedancer/tree/main/src/ballet/bmtree)**Note: bmtree32 is written in pure C. This benchmark currently uses FFI therefore there is a certain performance penalty(due to lack of inlining and optimisation)**
System Info:
```
Rust - rustc 1.70.0 (90c541806 2023-05-31)
GCC - gcc (Ubuntu 12.2.0-17ubuntu1) 12.2.0
Clang - Ubuntu clang version 15.0.7
Linux Kernal - 6.2.0-20-generic
Distro - Ubuntu 23.04
```### Flamegraph Setup
Refer [these](https://github.com/flamegraph-rs/flamegraph#installation) steps to setup flamegraph generationIf you face permission issues while using linux perf then use
`sudo sysctl -w kernel.perf_event_paranoid=2`Then run the following command to generate flamegraph.
`CARGO_PROFILE_BENCH_DEBUG=true cargo flamegraph --bench merkle_bench`## Results
Machine - `Intel i5 12400 w/ 16G Ram`
![Result-1](./r1.png)
![Flamegraph-1](./flamegraph.svg)
Machine - `m3.large.x86`
![image](https://github.com/tinydancer-io/merkle-bench/assets/32778608/5d544ecf-49a1-4be0-b50f-cabdbeee71f7)![Flamegraph-2](./amdflame.svg)