Skip to main content
Version: 0.1.0

Performance and Benchmarks

Circom

In summary:
Both native witness generation and proof generation are generally faster than snarkjs in the browser, with potential speed improvements of up to 20 times.
However, performance varies across different circuits. We recommend developers benchmark their custom circuits before selecting tools for app development.

Details
warning

iOS

Benchmarks on an iPhone 12 mini (2020).

Witness generation
SHA256witnesscalccircom-witness-rswasmerw2csnarkjs
Average22.3 ms36.1 ms476.1 ms90.3 ms163.5 ms
Stdev1.2 ms0.3 ms27.8 ms1.2 ms6.7 ms
Comparing to snarkjs~7x~4.5x~(-3)x~1.8-
Keccak256witnesscalccircom-witness-rswasmerw2csnarkjs
Average144.7 ms26.2 ms440.7 ms160.7 ms257.1 ms
Stdev1.8 ms4.5 ms10.4 ms3.3 ms4.1 ms
Comparing to snarkjs~1.8x~10x~(-1.7)x~1.6x-
RSAwitnesscalccircom-witness-rswasmerw2csnarkjs
Average208.5 ms513.1 ms5488 ms3861 ms5421 ms
Stdev5.8 ms11.2 ms47.8 ms10.8 ms9.9 ms
Comparing to snarkjs~26x~10x~(-1)x~1.4x-
Proof generation
SHA256rapidsnarkark-workssnarkjs
Average795.2 ms550.4 ms2374.1 ms
Stdev17.2 ms27.2 ms62.9 ms
Comparing to snarkjs~3x~4.3x-
Keccak256rapidsnarkark-workssnarkjs
Average2647.9 ms1221.1 ms8149.1 ms
Stdev14.4 ms42.7 ms283.575 ms
Comparing to snarkjs~3x~6.7x-
RSArapidsnarkark-workssnarkjs
Average2908.6 ms2324.4 ms10304.8 ms
Stdev112.9 ms67.1 ms605.5 ms
Comparing to snarkjs~3.5x~4.4x-

Details: Spreadsheet of Circom benchmark (iOS)

note

Android

TBD

macOS

Benchmarks on an Macbook Pro M1 Max (2021).

Witness generation
SHA256Tachyonwitnesscalccircom-witness-rswasmerw2csnarkjs
Average32.7 ms22.2 ms42.8 ms454.5 ms88.8 ms132.8 ms
Stdev0.7 ms5.2 ms2.2 ms26.7 ms1.0 ms1.3 ms
Comparing to snarkjs~4x~6x~3x~(-3.4)x~1.5x-
Keccak256Tachyonwitnesscalccircom-witness-rswasmerw2csnarkjs
Average82.9 ms72.3 ms14.1 ms447.1 ms169 ms234.6 ms
Stdev0.2 ms7.7 ms0.8 ms5.9 ms2.0 ms3.2 ms
Comparing to snarkjs~2.8x~3x~16x~(-1.9)xx1.4x-
RSATachyonwitnesscalccircom-witness-rswasmerw2csnarkjs
Average218.4 ms167.6 ms522.9 ms5109 ms3847.2 ms4638.8 ms
Stdev16.8 ms7.5 ms7.7 ms25.1 ms61.3 ms32.4 ms
Comparing to snarkjs~21.2~27x~8.8x~(-1.1)x~1.2x-
Proof generation
SHA256Tachyonrapidsnarkark-workssnarkjs
Average536.1 ms773.8 ms1137.3 ms1350.4 ms
Stdev10 ms17 ms127 ms26 ms
Comparing to snarkjs~2.5x~1.7x~1.1-
Keccak256Tachyonrapidsnarkark-workssnarkjs
Average1931 ms2514 ms1133 ms3791 ms
Stdev31.9 ms75.2 ms168 ms58.6 ms
Comparing to snarkjs~1.9x~1.5x~3.3-
RSATachyonrapidsnarkark-workssnarkjs
Average2307 ms2560 ms2530 ms5504 ms
Stdev18.7 ms21.3 ms266.1 ms69.3 ms
Comparing to snarkjs~2.3~2.1x~2.1x-

Details: Spreadsheet of Circom benchmark (macOS)

Halo2

In summary:
The performance of the Mopro build is comparable to the native Halo2 build.

Details

The bellow tests were run on a Macbook Pro M1 Pro (2021) as well as an iPhone 15 Pro (2023).

Keccak256Prove Time (s)Verify Time (s)
Native (M1 Pro)10.3 s0.15 s
Emulator (M1 Pro)10.1 s0.13 s
iPhone 15 Pro11.0 s0.12 s
RSAProve Time (s)Verify Time (s)
Native (M1 Pro)76.5 s11.1 s
Emulator (M1 Pro)64.5 s9.0 s
iPhone 15 Procrashescrashes

Note that the iPhone 15 Pro crashes when running the RSA circuit due to the large memory requirements. The circuit needs around 5GB of memory to run, while the iPhone 15 Pro usually limits the application memory usage to 3GB.