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

test(benchmark): add baby bear poseidon2 benchmark #519

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 39 additions & 35 deletions benchmark/poseidon2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,46 @@ CPU Caches:
L2 Unified 4096 KiB (x12)
```

Note that Poseidon2 runs 100x per test due to some time results being too small when running a single iteration.

batzor marked this conversation as resolved.
Show resolved Hide resolved
## BN254

```shell
bazel run -c opt --//:has_openmp --//:has_rtti --//:has_matplotlib //benchmark/poseidon2:poseidon2_benchmark -- -p bn254_fr --vendor horizen --vendor plonky3 --check_results
```

#### On Intel i9-13900K

| Repetition | Tachyon | Horizen | Plonky3 |
| :--------- | ------- | ----------- | ------- |
| 0 | 8e-06 | **7e-06** | 1e-05 |
| 1 | 7e-06 | **5e-06** | 8e-06 |
| 2 | 5e-06 | **4e-06** | 8e-06 |
| 3 | 6e-06 | **4e-06** | 8e-06 |
| 4 | 5e-06 | **3e-06** | 7e-06 |
| 5 | 6e-06 | **3e-06** | 7e-06 |
| 6 | 5e-06 | **3e-06** | 7e-06 |
| 7 | 6e-06 | **3e-06** | 7e-06 |
| 8 | 5e-06 | **4e-06** | 7e-06 |
| 9 | 5e-06 | **3e-06** | 7e-06 |
| avg | 5.8e-06 | **3.9e-06** | 7.6e-06 |

![image](/benchmark/poseidon2/poseidon2_benchmark_ubuntu_i9.png)

#### On Mac M3 Pro

| Repetition | Tachyon | Horizen | Plonky3 |
| :--------- | ------- | ----------- | -------- |
| 0 | 1.3e-05 | **1.2e-05** | 1.5e-05 |
| 1 | 1e-05 | **8e-06** | 1.1e-05 |
| 2 | 9e-06 | **7e-06** | 1e-05 |
| 3 | 9e-06 | **7e-06** | 1e-05 |
| 4 | 9e-06 | **7e-06** | 1e-05 |
| 5 | 9e-06 | **7e-06** | 1e-05 |
| 6 | 9e-06 | **7e-06** | 1e-05 |
| 7 | 9e-06 | **7e-06** | 1e-05 |
| 8 | 9e-06 | **7e-06** | 1e-05 |
| 9 | 9e-06 | **7e-06** | 1e-05 |
| avg | 9.5e-06 | **7.6e-06** | 1.06e-05 |

![image](/benchmark/poseidon2/poseidon2_benchmark_mac_m3.png)
### On Intel i9-13900K

| Trial Number | Tachyon | Horizen | Plonky3 |
| :----------- | --------- | ------------- | --------- |
| 0 | 0.000788 | **0.000534** | 0.000876 |
| 1 | 0.000628 | **0.000585** | 0.00087 |
| 2 | 0.000624 | **0.000517** | 0.000865 |
| 3 | 0.000622 | **0.000513** | 0.000866 |
| 4 | 0.000634 | **0.000603** | 0.000861 |
| 5 | 0.000628 | **0.000512** | 0.001002 |
| 6 | 0.000618 | **0.00051** | 0.000853 |
| 7 | 0.000616 | **0.000553** | 0.000852 |
| 8 | 0.0007 | **0.000693** | 0.000873 |
| 9 | 0.000614 | **0.000525** | 0.000937 |
| avg | 0.0006472 | **0.0005545** | 0.0008855 |

![image](/benchmark/poseidon2/poseidon2_benchmark_bn254_ubuntu_i9.png)

### On Mac M3 Pro

| Trial Number | Tachyon | Horizen | Plonky3 |
| :----------- | --------- | ------------- | --------- |
| 0 | 0.001053 | **0.000816** | 0.001186 |
| 1 | 0.001033 | **0.00076** | 0.001177 |
| 2 | 0.001019 | **0.000726** | 0.001157 |
| 3 | 0.001012 | **0.000712** | 0.001172 |
| 4 | 0.001007 | **0.000691** | 0.001152 |
| 5 | 0.001023 | **0.000684** | 0.001131 |
| 6 | 0.001051 | **0.000682** | 0.001123 |
| 7 | 0.001005 | **0.000678** | 0.001116 |
| 8 | 0.000996 | **0.000687** | 0.001118 |
| 9 | 0.001003 | **0.00068** | 0.001127 |
| avg | 0.0010202 | **0.0007116** | 0.0011459 |

![image](/benchmark/poseidon2/poseidon2_benchmark_bn254_mac_m3.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed benchmark/poseidon2/poseidon2_benchmark_mac_m3.png
Binary file not shown.
Binary file not shown.