Long runtime for main() in examples/paper.rs
DanieleDiBenedetto opened this issue · 5 comments
Hi everyone,
I cloned the repository and compiled the code using cargo build --release.
Then I executed the main() function in paper.rs, but parameters and recursive proofs generation takes quite a long time to execute:
Making parameters
done, took 565.443144333s
creating proof1
done, took 1334.410390658s
verifying proof1
done, took 59.727668915s
creating proof2
done, took 1343.427346562s
verifying proof2
done, took 128.97836519s
creating proof3
done, took 1392.430266872s
verifying proof3
done, took 125.734783976s
creating proof4
done, took 1372.966353744s
verifying proof4
done, took 128.639343493s
...
I'm using an Ubuntu 18.04.2 (64bit) VM running on Oracle VM Virtualbox, to which I allocated 4 cores of an Intel Core i7-8750H CPU @ 2.20GHz and 8GB RAM. I also set the cargo profile in cargo.toml in this way:
opt-level = 3
lto = true
codegen-units = 1
Is this expected or am I doing something wrong ?
Thanks in advance !
Yes, this is currently expected; the process is practical but quite compute-heavy. It is somewhat parallelizable however. Here are runtimes from my desktop (i7-8700K @ 4.8GHz, 12 threads):
Making parameters
done, took 201.229319s
creating proof1
done, took 641.1819671s
verifying proof1
done, took 30.4978183s
creating proof2
done, took 649.7985592s
verifying proof2
done, took 63.7774883s
...
We are also in the midst of implementing a bunch of optimizations, which should improve runtimes.
Thanks for you response !
I know that is probably too soon to ask this, but do you have any estimation on how will be the performances in the future ?
It should now be about twice as fast as before. Probably another 5x improvement over the next week, but I'm not sure.
Thanks, looking forward to it !
For the record on 2x AMD EPYC 7571@2.1 GHz, 96 Threads:
Making parameters
done, took 28.283145675s
creating proof1
done, took 158.653410165s
verifying proof1
done, took 15.167543643s
creating proof2
done, took 154.679692654s
verifying proof2
done, took 16.998693472s
creating proof3
done, took 157.051649292s
verifying proof3
done, took 17.271718376s
creating proof4
done, took 154.878181398s
verifying proof4
done, took 17.134303745s
creating proof5
done, took 156.309865008s
verifying proof5
done, took 17.04479827s