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

Allow running instructions from pcs outside the program segment #1493

Merged
merged 30 commits into from
Nov 28, 2023

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Nov 24, 2023

In order to run the os, we need to load programs into new segments and run them by setting the pc to their starting location. In order to achieve this, we must handle pc's with an index different from 0 in step_instruction.
Depends on #1492 (for testing)

@fmoletta fmoletta changed the base branch from main to revert-trace-optimization November 24, 2023 13:37
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (0941386) 96.81% compared to head (2a3a0fb) 96.81%.

Files Patch % Lines
vm/src/vm/vm_core.rs 95.04% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1493      +/-   ##
==========================================
- Coverage   96.81%   96.81%   -0.01%     
==========================================
  Files          96       96              
  Lines       39581    39684     +103     
==========================================
+ Hits        38322    38419      +97     
- Misses       1259     1265       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Nov 24, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.616 ± 0.033 2.591 2.700 1.00
head big_factorial 2.827 ± 0.043 2.787 2.931 1.08 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.231 ± 0.077 2.190 2.444 1.00
head big_fibonacci 2.430 ± 0.049 2.401 2.559 1.09 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.540 ± 0.047 7.474 7.622 1.00
head blake2s_integration_benchmark 8.680 ± 0.342 8.420 9.302 1.15 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.635 ± 0.043 2.609 2.754 1.00
head compare_arrays_200000 2.896 ± 0.086 2.839 3.113 1.10 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.770 ± 0.020 1.751 1.821 1.00
head dict_integration_benchmark 1.885 ± 0.005 1.877 1.890 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.262 ± 0.009 1.252 1.280 1.00
head field_arithmetic_get_square_benchmark 1.390 ± 0.024 1.372 1.438 1.10 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 6.132 ± 0.047 6.076 6.209 1.00
head integration_builtins 6.932 ± 0.074 6.855 7.119 1.13 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.624 ± 0.058 7.572 7.774 1.00
head keccak_integration_benchmark 8.606 ± 0.045 8.547 8.701 1.13 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.667 ± 0.012 2.647 2.690 1.00
head linear_search 2.906 ± 0.033 2.871 2.982 1.09 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.758 ± 0.005 1.749 1.765 1.00
head math_cmp_and_pow_integration_benchmark 1.877 ± 0.010 1.866 1.895 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.695 ± 0.024 1.671 1.744 1.00
head math_integration_benchmark 1.797 ± 0.004 1.791 1.805 1.06 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.503 ± 0.023 1.487 1.566 1.00
head memory_integration_benchmark 1.631 ± 0.031 1.609 1.691 1.09 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.642 ± 0.068 1.611 1.833 1.00
head operations_with_data_structures_benchmarks 1.742 ± 0.011 1.727 1.764 1.06 ± 0.04
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 592.8 ± 1.2 590.3 594.7 1.00
head pedersen 615.8 ± 2.7 611.7 619.4 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.195 ± 0.005 1.187 1.201 1.00
head poseidon_integration_benchmark 1.229 ± 0.010 1.221 1.257 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.193 ± 0.020 2.176 2.244 1.00
head secp_integration_benchmark 2.310 ± 0.020 2.277 2.342 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.201 ± 0.021 1.188 1.259 1.00
head set_integration_benchmark 1.216 ± 0.004 1.211 1.222 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.613 ± 0.017 4.589 4.650 1.00
head uint256_integration_benchmark 5.089 ± 0.048 5.045 5.167 1.10 ± 0.01

@fmoletta fmoletta marked this pull request as ready for review November 24, 2023 14:38
Base automatically changed from revert-trace-optimization to main November 24, 2023 22:05
@Oppen Oppen changed the title Allow running instructions from pcs outside the program segement Allow running instructions from pcs outside the program segment Nov 28, 2023
@Oppen Oppen enabled auto-merge November 28, 2023 15:47
@Oppen Oppen added this pull request to the merge queue Nov 28, 2023
Merged via the queue into main with commit 8daae06 Nov 28, 2023
49 of 50 checks passed
@Oppen Oppen deleted the run-instruction-from-other-pc branch November 28, 2023 16:34
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.

None yet

3 participants