Due to their nature, FHE types are slower than native types, so it is recommended to always build and run your project in release mode (
cargo build --release,
cargo run --release).
Another option that may improve performances is to enable
fatlink time optimizations:
lto = "fat"
You should compare the run time with and without LTO to see if it improves performances.
With FHE types, the more precision you have, the more the computations are expensive. Therefore, it is important to choose the smallest type that can represent all your values.
concretegives the ability to create
dynamictypes, that is, types that are created and customized at runtime to better fit your needs and try to gain performances. This feature can be a great option if for example, you only need 10 bits of precision and that
concretedoes not expose an integer type with exactly 10 bits.