Slow Initial Table Lookup in Concrete Circuit - Seeking Explanation

Hello everyone,

I am working on a project where I have implemented a table lookup using Concrete. I’ve noticed that the first table lookup operation takes a significantly long time to execute, but subsequent queries are much faster. I’m curious to understand why there is this initial delay during the first table lookup. Can someone please help me understand the possible reasons behind this?

Thank you in advance for your assistance!

Hi @Holly_Liang,

If you’re calling encrypt_run_decrypt without performing key generation manually, it’ll generate random keys for you, which takes a lot of time.

To manually control key generation, you can call circuit.keys.generate() right after you obtain the circuit.

Let us know if this helps!