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
514 stars 144 forks source link

Update cairo-lang version to 2.6.4 #1799

Closed FrancoGiachetta closed 3 months ago

FrancoGiachetta commented 3 months ago

Bump cairo-lang- depencencies to version 2.6.4

Description

Update cairo-lang version to 2.6.4. Also made some changes related to this PR.

Checklist

github-actions[bot] commented 3 months ago
**Hyper Thereading Benchmark results**

hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     26.576 s ±  0.056 s    [User: 25.809 s, System: 0.766 s]
  Range (min … max):   26.536 s … 26.615 s    2 runs

Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     25.995 s ±  0.012 s    [User: 25.267 s, System: 0.727 s]
  Range (min … max):   25.987 s … 26.003 s    2 runs

Summary
  'hyper_threading_pr threads: 1' ran
    1.02 ± 0.00 times faster than 'hyper_threading_main threads: 1'

hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     14.953 s ±  0.008 s    [User: 26.327 s, System: 0.786 s]
  Range (min … max):   14.947 s … 14.958 s    2 runs

Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.702 s ±  0.034 s    [User: 26.110 s, System: 0.732 s]
  Range (min … max):   14.678 s … 14.727 s    2 runs

Summary
  'hyper_threading_pr threads: 2' ran
    1.02 ± 0.00 times faster than 'hyper_threading_main threads: 2'

hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     10.468 s ±  0.126 s    [User: 37.835 s, System: 1.031 s]
  Range (min … max):   10.379 s … 10.557 s    2 runs

Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.697 s ±  0.142 s    [User: 38.142 s, System: 0.931 s]
  Range (min … max):   10.597 s … 10.797 s    2 runs

Summary
  'hyper_threading_main threads: 4' ran
    1.02 ± 0.02 times faster than 'hyper_threading_pr threads: 4'

hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     10.679 s ±  0.086 s    [User: 37.890 s, System: 0.978 s]
  Range (min … max):   10.618 s … 10.740 s    2 runs

Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.318 s ±  0.004 s    [User: 38.314 s, System: 0.964 s]
  Range (min … max):   10.315 s … 10.321 s    2 runs

Summary
  'hyper_threading_pr threads: 6' ran
    1.04 ± 0.01 times faster than 'hyper_threading_main threads: 6'

hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     10.419 s ±  0.180 s    [User: 38.448 s, System: 1.044 s]
  Range (min … max):   10.291 s … 10.546 s    2 runs

Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.537 s ±  0.220 s    [User: 38.320 s, System: 0.957 s]
  Range (min … max):   10.381 s … 10.693 s    2 runs

Summary
  'hyper_threading_main threads: 8' ran
    1.01 ± 0.03 times faster than 'hyper_threading_pr threads: 8'

hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     10.318 s ±  0.236 s    [User: 38.720 s, System: 1.068 s]
  Range (min … max):   10.152 s … 10.485 s    2 runs

Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.379 s ±  0.216 s    [User: 38.571 s, System: 0.974 s]
  Range (min … max):   10.227 s … 10.532 s    2 runs

Summary
  'hyper_threading_main threads: 16' ran
    1.01 ± 0.03 times faster than 'hyper_threading_pr threads: 16'
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.79%. Comparing base (8b5d1c6) to head (94d4feb).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1799 +/- ## ======================================= Coverage 94.79% 94.79% ======================================= Files 102 102 Lines 40138 40138 ======================================= Hits 38047 38047 Misses 2091 2091 ```

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

github-actions[bot] commented 3 months ago

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.097 ± 0.067 2.051 2.271 1.03 ± 0.03
head big_factorial 2.044 ± 0.010 2.033 2.070 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.009 ± 0.070 1.963 2.202 1.02 ± 0.04
head big_fibonacci 1.974 ± 0.006 1.969 1.989 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.615 ± 0.074 7.500 7.684 1.00
head blake2s_integration_benchmark 7.657 ± 0.193 7.465 8.109 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.126 ± 0.014 2.109 2.153 1.01 ± 0.01
head compare_arrays_200000 2.104 ± 0.007 2.090 2.114 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.408 ± 0.020 1.379 1.454 1.00 ± 0.02
head dict_integration_benchmark 1.401 ± 0.015 1.387 1.442 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.212 ± 0.008 1.201 1.223 1.00
head field_arithmetic_get_square_benchmark 1.215 ± 0.011 1.200 1.234 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.616 ± 0.073 7.532 7.707 1.00 ± 0.02
head integration_builtins 7.594 ± 0.100 7.503 7.767 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.998 ± 0.265 7.798 8.726 1.00
head keccak_integration_benchmark 8.082 ± 0.300 7.749 8.869 1.01 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.107 ± 0.023 2.082 2.153 1.00 ± 0.01
head linear_search 2.096 ± 0.010 2.078 2.117 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.461 ± 0.021 1.439 1.505 1.00
head math_cmp_and_pow_integration_benchmark 1.476 ± 0.021 1.457 1.531 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.445 ± 0.008 1.434 1.459 1.03 ± 0.01
head math_integration_benchmark 1.410 ± 0.007 1.402 1.424 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.224 ± 0.081 1.184 1.452 1.05 ± 0.07
head memory_integration_benchmark 1.167 ± 0.008 1.159 1.187 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.559 ± 0.029 1.528 1.626 1.01 ± 0.02
head operations_with_data_structures_benchmarks 1.543 ± 0.022 1.529 1.603 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 518.5 ± 5.4 511.8 527.6 1.00 ± 0.01
head pedersen 518.3 ± 1.4 516.4 521.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 738.5 ± 5.6 733.8 753.2 1.00 ± 0.01
head poseidon_integration_benchmark 735.7 ± 4.0 731.8 743.4 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.819 ± 0.057 1.779 1.930 1.01 ± 0.04
head secp_integration_benchmark 1.801 ± 0.036 1.771 1.897 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 666.5 ± 2.8 661.9 671.3 1.04 ± 0.01
head set_integration_benchmark 641.8 ± 5.1 638.1 654.2 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.293 ± 0.286 4.126 5.091 1.03 ± 0.07
head uint256_integration_benchmark 4.169 ± 0.028 4.116 4.208 1.00