Back to Tachyon

Poseidon2 Hash Benchmark

benchmark/poseidon2/README.md

0.4.05.4 KB
Original Source

Poseidon2 Hash Benchmark

Run on 13th Gen Intel(R) Core(TM) i9-13900K (32 X 5500 MHz CPU s)
Compiler: clang-15
CPU Caches:
  L1 Data 48 KiB (x16)
  L1 Instruction 32 KiB (x16)
  L2 Unified 2048 KiB (x16)
  L3 Unified 36864 KiB (x1)

Run on Apple M3 Pro (12 X 4050 MHz)
CPU Caches:
  L1 Data 64 KiB (x12)
  L1 Instruction 128 KiB (x12)
  L2 Unified 4096 KiB (x12)

Note: Run with build --@rules_rust//:extra_rustc_flags="-Ctarget-cpu=native" in your .bazelrc.user Note that Poseidon2 runs 10000x per test due to some time results being too small when running a single iteration.

BN254

shell
GOMP_SPINCOUNT=0 bazel run --config maxopt --//:has_matplotlib //benchmark/poseidon2:poseidon2_benchmark -- -p bn254_fr --vendor horizen --vendor plonky3 --check_results

On Intel i9-13900K

Trial NumberTachyonHorizenPlonky3
00.0692280.0509030.085679
10.0620460.0508920.085772
20.060530.0508480.08553
30.0606480.0508250.085643
40.0605530.0511260.08583
50.0605920.053620.085475
60.0605760.0509360.085731
70.060510.050810.085613
80.0605610.0508890.086382
90.0605580.0508960.086557
avg0.061580.0511740.085821

On Mac M3 Pro

Trial NumberTachyonHorizenPlonky3
00.0689670.0587280.086994
10.0687860.058390.086825
20.0686580.0582450.086779
30.0686730.0581890.086693
40.0686750.0583030.08674
50.0686930.0581090.08681
60.0686210.0584050.086816
70.0687470.0582470.086871
80.0686370.0583830.086842
90.0686650.0581620.086846
avg0.0687120.0583160.086821

Baby Bear

Note: Horizen and Plonky3 compute values with a different internal matrix, requiring them to be compared with Tachyon separately.

Horizen

shell
GOMP_SPINCOUNT=0 bazel run --config maxopt --//:has_matplotlib //benchmark/poseidon2:poseidon2_benchmark -- -p baby_bear --vendor horizen --check_results

On Intel i9-13900K

Trial NumberTachyonHorizen
00.0114240.034238
10.0119750.034214
20.0115050.034245
30.0113040.03418
40.0113130.034231
50.0113540.034234
60.0107430.034487
70.010710.034259
80.0107060.034229
90.0107080.034246
avg0.0111740.034256

On Mac M3 Pro

Trial NumberTachyonHorizen
00.0106790.014511
10.0104480.014653
20.0102860.014961
30.010240.014769
40.0102330.014717
50.0102670.014761
60.0102260.01514
70.0103030.01475
80.0102530.014693
90.0103260.014533
avg0.0103260.014748

Plonky3

shell
GOMP_SPINCOUNT=0 bazel run --config maxopt --//:has_matplotlib //benchmark/poseidon2:poseidon2_benchmark -- -p baby_bear --vendor plonky3 --check_results

On Intel i9-13900K

Trial NumberTachyonPlonky3
00.009990.005391
10.0098820.005298
20.0098480.00513
30.0097720.005157
40.009770.005072
50.0097740.005032
60.0097830.005062
70.0098780.005077
80.0097780.005014
90.0097620.005016
avg0.0098230.005124

On Mac M3 Pro

Trial NumberTachyonPlonky3
00.0091160.007311
10.0089670.007352
20.0088050.007312
30.0087480.007315
40.0087420.007339
50.0087410.007309
60.0087740.00732
70.008730.007696
80.0087910.007342
90.0087410.007353
avg0.0088150.007364

****