Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sorting on sp1 #818

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

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