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

Runner: include data from constants segment to the bytecode when assembling program #1864

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

m-kus
Copy link
Contributor

@m-kus m-kus commented Oct 31, 2024

Description

Fixes #1852

This PR changes the way program bytecode is assembled when cairo1-run is executed: an existing CairoProgram::assemble_ex method is used which combines program instructions, entry/footer, and constants segments (if any).

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@m-kus m-kus changed the title Include data from constants segment to the bytecode when assembling Include data from constants segment to the bytecode when assembling bytecode Oct 31, 2024
@m-kus m-kus changed the title Include data from constants segment to the bytecode when assembling bytecode Runner: include data from constants segment to the bytecode when assembling program Oct 31, 2024
@m-kus m-kus force-pushed the fix/assemble-consts-segment branch from 2550715 to 6c23578 Compare October 31, 2024 13:43
@pefontana
Copy link
Collaborator

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
2.513 ± 0.060 2.460 2.630 1.00
2.521 ± 0.049 2.462 2.591 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
2.487 ± 0.076 2.407 2.619 1.02 ± 0.03
2.441 ± 0.023 2.413 2.464 1.00
Command Mean [s] Min [s] Max [s] Relative
9.115 ± 0.112 9.012 9.343 1.00
9.268 ± 0.118 9.077 9.478 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
2.582 ± 0.033 2.542 2.644 1.00
2.608 ± 0.046 2.545 2.717 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
1.688 ± 0.028 1.666 1.751 1.00
1.707 ± 0.015 1.676 1.725 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
1.423 ± 0.011 1.411 1.438 1.00
1.441 ± 0.014 1.414 1.467 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
9.227 ± 0.213 9.066 9.767 1.00 ± 0.02
9.194 ± 0.077 9.093 9.293 1.00
Command Mean [s] Min [s] Max [s] Relative
9.415 ± 0.066 9.350 9.535 1.00
9.609 ± 0.387 9.360 10.691 1.02 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
2.584 ± 0.046 2.536 2.674 1.00 ± 0.03
2.577 ± 0.054 2.531 2.692 1.00
Command Mean [s] Min [s] Max [s] Relative
1.746 ± 0.028 1.700 1.802 1.00
1.761 ± 0.049 1.721 1.881 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
1.696 ± 0.021 1.668 1.736 1.01 ± 0.02
1.683 ± 0.015 1.662 1.703 1.00
Command Mean [s] Min [s] Max [s] Relative
1.422 ± 0.027 1.398 1.490 1.00
1.447 ± 0.041 1.413 1.516 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
1.804 ± 0.016 1.782 1.828 1.00
1.841 ± 0.044 1.791 1.914 1.02 ± 0.03
Command Mean [ms] Min [ms] Max [ms] Relative
594.5 ± 6.2 589.6 610.1 1.00
595.9 ± 2.7 592.3 599.7 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
698.5 ± 15.7 685.6 736.7 1.00
701.3 ± 6.9 693.2 715.0 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
2.072 ± 0.023 2.044 2.124 1.00
2.089 ± 0.025 2.060 2.134 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
712.4 ± 10.1 692.3 726.0 1.00
718.6 ± 13.1 695.5 736.9 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
5.046 ± 0.073 4.956 5.155 1.00
5.059 ± 0.062 4.983 5.141 1.00 ± 0.02

@pefontana pefontana added this pull request to the merge queue Nov 6, 2024
Merged via the queue into lambdaclass:main with commit 84e513d Nov 6, 2024
68 of 71 checks passed
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.

FailedToComputeOperands error when running cairo1-run
3 participants