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
509 stars 142 forks source link

[WIP] Yeet the Cows #1560

Closed fmoletta closed 8 months ago

fmoletta commented 8 months ago

TITLE

Description

Description of the pull request changes and motivation.

Checklist

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (b020f11) 97.21% compared to head (5dc07a9) 97.22%.

Files Patch % Lines
...cessor/builtin_hint_processor/find_element_hint.rs 77.77% 2 Missing :warning:
...int_processor/builtin_hint_processor/math_utils.rs 93.10% 2 Missing :warning:
vm/src/vm/runners/builtin_runner/poseidon.rs 77.77% 2 Missing :warning:
vm/src/vm/runners/builtin_runner/signature.rs 0.00% 2 Missing :warning:
cairo1-run/src/main.rs 0.00% 1 Missing :warning:
.../hint_processor/builtin_hint_processor/ec_utils.rs 87.50% 1 Missing :warning:
vm/src/hint_processor/hint_processor_utils.rs 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1560 +/- ## ======================================= Coverage 97.21% 97.22% ======================================= Files 90 90 Lines 36454 36395 -59 ======================================= - Hits 35439 35384 -55 + Misses 1015 1011 -4 ```

: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.213 ± 0.018 2.188 2.237 1.00
head big_factorial 2.284 ± 0.046 2.246 2.408 1.03 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.151 ± 0.036 2.106 2.213 1.00
head big_fibonacci 2.297 ± 0.027 2.251 2.339 1.07 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.915 ± 0.090 7.800 8.054 1.00
head blake2s_integration_benchmark 8.416 ± 0.121 8.233 8.596 1.06 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.224 ± 0.030 2.180 2.265 1.00
head compare_arrays_200000 2.323 ± 0.045 2.278 2.436 1.04 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.453 ± 0.009 1.434 1.464 1.00
head dict_integration_benchmark 1.490 ± 0.017 1.464 1.527 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.239 ± 0.009 1.223 1.250 1.00
head field_arithmetic_get_square_benchmark 1.300 ± 0.016 1.288 1.335 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.992 ± 0.094 7.826 8.111 1.00
head integration_builtins 8.418 ± 0.103 8.257 8.608 1.05 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.147 ± 0.086 8.027 8.261 1.00
head keccak_integration_benchmark 8.646 ± 0.115 8.501 8.881 1.06 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.262 ± 0.054 2.211 2.390 1.00
head linear_search 2.383 ± 0.047 2.320 2.456 1.05 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.567 ± 0.018 1.537 1.602 1.00
head math_cmp_and_pow_integration_benchmark 1.582 ± 0.005 1.574 1.590 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.406 ± 0.015 1.389 1.438 1.00
head math_integration_benchmark 1.474 ± 0.007 1.460 1.485 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.237 ± 0.009 1.226 1.256 1.00
head memory_integration_benchmark 1.254 ± 0.007 1.244 1.265 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.561 ± 0.006 1.554 1.572 1.00
head operations_with_data_structures_benchmarks 1.636 ± 0.019 1.594 1.658 1.05 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 602.1 ± 2.7 598.5 606.2 1.00
head pedersen 611.8 ± 2.5 607.9 615.2 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.056 ± 0.016 1.038 1.088 1.00
head poseidon_integration_benchmark 1.063 ± 0.009 1.051 1.075 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.902 ± 0.030 1.874 1.974 1.00
head secp_integration_benchmark 1.958 ± 0.009 1.945 1.969 1.03 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 760.1 ± 3.1 755.3 765.2 1.00
head set_integration_benchmark 773.4 ± 11.7 765.2 805.8 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.427 ± 0.065 4.343 4.508 1.00
head uint256_integration_benchmark 4.629 ± 0.079 4.535 4.815 1.05 ± 0.02
fmoletta commented 8 months ago

Perf regression