lambdaclass / cairo-vm

cairo-vm is a Rust implementation of the Cairo VM. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly without the need for this party to re-execute the same program.
https://lambdaclass.github.io/cairo-vm
Apache License 2.0
508 stars 142 forks source link

bugfixes: Fix memory hole count inconsistencies #1585

Closed fmoletta closed 7 months ago

fmoletta commented 8 months ago

BugFixes:

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (826e72c) 97.15% compared to head (76461a7) 97.14%.

Files Patch % Lines
vm/src/vm/vm_memory/memory.rs 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1585 +/- ## ========================================== - Coverage 97.15% 97.14% -0.01% ========================================== Files 91 91 Lines 37194 37206 +12 ========================================== + Hits 36134 36145 +11 - Misses 1060 1061 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 8 months ago

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.241 ± 0.020 2.221 2.285 1.00 ± 0.01
head big_factorial 2.239 ± 0.014 2.222 2.263 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.220 ± 0.020 2.202 2.271 1.00 ± 0.01
head big_fibonacci 2.216 ± 0.008 2.207 2.232 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.042 ± 0.026 8.012 8.106 1.00
head blake2s_integration_benchmark 8.179 ± 0.060 8.133 8.282 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.286 ± 0.014 2.273 2.310 1.00
head compare_arrays_200000 2.291 ± 0.005 2.284 2.298 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.439 ± 0.009 1.429 1.455 1.00
head dict_integration_benchmark 1.445 ± 0.005 1.440 1.455 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.288 ± 0.011 1.278 1.311 1.00 ± 0.01
head field_arithmetic_get_square_benchmark 1.284 ± 0.004 1.278 1.293 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.143 ± 0.068 8.069 8.233 1.00
head integration_builtins 8.217 ± 0.058 8.150 8.303 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.432 ± 0.053 8.345 8.494 1.00
head keccak_integration_benchmark 8.536 ± 0.079 8.445 8.635 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.310 ± 0.043 2.274 2.421 1.00 ± 0.02
head linear_search 2.304 ± 0.017 2.286 2.345 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.581 ± 0.018 1.565 1.612 1.00 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.580 ± 0.012 1.569 1.607 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.432 ± 0.005 1.424 1.444 1.01 ± 0.00
head math_integration_benchmark 1.420 ± 0.003 1.414 1.424 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.254 ± 0.004 1.249 1.261 1.00 ± 0.00
head memory_integration_benchmark 1.251 ± 0.004 1.247 1.259 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.614 ± 0.005 1.609 1.621 1.00 ± 0.00
head operations_with_data_structures_benchmarks 1.609 ± 0.006 1.602 1.624 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 608.7 ± 10.7 602.5 638.7 1.01 ± 0.02
head pedersen 603.7 ± 1.8 601.0 606.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.059 ± 0.004 1.050 1.063 1.00 ± 0.01
head poseidon_integration_benchmark 1.057 ± 0.005 1.050 1.067 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.914 ± 0.003 1.911 1.920 1.00
head secp_integration_benchmark 1.928 ± 0.006 1.922 1.940 1.01 ± 0.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 748.3 ± 3.9 745.2 758.5 1.00
head set_integration_benchmark 749.4 ± 1.6 748.2 752.7 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.477 ± 0.032 4.442 4.522 1.00
head uint256_integration_benchmark 4.523 ± 0.027 4.491 4.565 1.01 ± 0.01