Skip to content

Conversation

mcalancea
Copy link
Collaborator

Sandbox branch similar to #814.

Tests sorting guest program on sp1, as suggested by @matthiasgoergens .

To mitigate the possible impact of handling input (which I don't consider to be in scope here) I've opted to test on a pseudo-random sequence which is generated in-place; the program makes only one read (for the number of elements n).

Sp1 commands:

cd ~/ceno/sorting/program
cargo prove build
cd ~/ceno/sorting/script
time (RUST_LOG=info cargo run --release -- --n=5000 --prove)

and Ceno commands:

cd ~/ceno
time (cargo run --release --bin e2e -- --profiling=1 --n=5000 .)

@mcalancea
Copy link
Collaborator Author

mcalancea commented Jan 8, 2025

Results on my desktop for n = 5000.

Ceno
real    0m17,480s
user    2m25,239s
sys     0m3,960s

Sp1
real	1m17,193s
user	22m0,195s
sys	0m6,641s

Results on my desktop for n = 12000.

Ceno
real    0m27,557s
user    5m6,315s
sys     0m7,094s

Sp1
real	2m47,760s
user	51m56,870s
sys	0m15,340s

Informally: the speedup factor seems to grow when increasing n. At the same time it seems that increasing the number of cores benefits Sp1 more.

matthiasgoergens

This comment was marked as off-topic.

@matthiasgoergens
Copy link
Contributor

I think you forgot to turn on LTO for SP1?

@mcalancea
Copy link
Collaborator Author

I think you forgot to turn on LTO for SP1?

The cycle counts were close to start with. SP1 was possibly a bit below for some values of n if I remember correctly.

@lightsing lightsing mentioned this pull request Apr 16, 2025
5 tasks
github-merge-queue bot pushed a commit that referenced this pull request Apr 16, 2025
to try, in ceno/ceno_cli/example dir, run: 
```
$ cargo install --path .. --locked
$ cargo ceno run --release --hints 10 --public-io 4 --out-proof proof.bin --out-vk vk.bin
```

- [x] cargo ceno build
- [x] cargo ceno run
- [x] cargo ceno keygen
- [x] cargo ceno prove
- [x] cargo ceno verify

resolve #876

close #813
close #814
close #818
close #819

---------

Co-authored-by: Mihai <[email protected]>
Co-authored-by: Matthias Goergens <[email protected]>
@lispc lispc closed this in #902 Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants