Benchmarks
Due to their nature, homomorphic operations are naturally slower than their clear equivalent. Some timings are exposed for basic operations. For completeness, benchmarks for other libraries are also given.
All benchmarks were launched on an AWS m6i.metal with the following specifications: Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz and 512GB of RAM.
Boolean
This measures the execution time of a single binary Boolean gate.
tfhe-rs::boolean.
DEFAULT_PARAMETERS
8.8ms
6.8ms
TFHE_LIB_PARAMETERS
13.6ms
10.9ms
tfhe-lib.
default_128bit_gate_bootstrapping_parameters
28.9ms
15.7ms
OpenFHE.
STD_128
172ms
78ms
MEDIUM
113ms
50.2ms
Shortint
This measures the execution time for some operations and some parameter sets of tfhe-rs::shortint.
This uses the Concrete FFT + avx512 configuration.
PARAM_MESSAGE_1_CARRY_1
338 ns
8.3 ms
8.1 ms
PARAM_MESSAGE_2_CARRY_2
406 ns
18.4 ms
18.4 ms
PARAM_MESSAGE_3_CARRY_3
3.06 µs
134 ms
129.4 ms
PARAM_MESSAGE_4_CARRY_4
11.7 µs
854 ms
828.1 ms
Next, the timings for the operation flavor default
are given. This flavor ensures predictable timings of an operation all along the circuit by clearing the carry space after each operation.
PARAM_MESSAGE_1_CARRY_1
7.90 ms
8.00 ms
8.10 ms
PARAM_MESSAGE_2_CARRY_2
18.4 ms
18.1 ms
18.4 ms
PARAM_MESSAGE_3_CARRY_3
131.5 ms
129.5 ms
129.4 ms
PARAM_MESSAGE_4_CARRY_4
852.5 ms
839.7 ms
828.1 ms
Integer
This measures the execution time for some operation sets of tfhe-rs::integer.
All timings are related to parallelized Radix-based integer operations, where each block is encrypted using PARAM_MESSAGE_2_CARRY_2. To ensure predictable timings, the operation flavor is the default
one: a carry propagation is computed after each operation. Operation cost could be reduced by using unchecked
, checked
, or smart
.
8 bits
129.0 ms
227.2 ms
111.9 ms
186.8 ms
16 bits
256.3 ms
756.0 ms
145.3 ms
233.1 ms
32 bits
469.4 ms
2.10 s
192.0 ms
282.9 ms
40 bits
608.0 ms
3.37 s
228.4 ms
318.6 ms
64 bits
959.9 ms
5.53 s
249.0 ms
336.5 ms
128 bits
1.88 s
14.1 s
294.7 ms
398.6 ms
256 bits
3.66 s
29.2 s
361.8 ms
509.1 ms
Last updated