cairo-vm icon indicating copy to clipboard operation
cairo-vm copied to clipboard

[WIP] Add mod builtin

Open fmoletta opened this issue 1 year ago • 1 comments

TITLE

Description

Description of the pull request changes and motivation.

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.

fmoletta avatar Mar 18 '24 20:03 fmoletta

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.291 ± 0.035 2.251 2.345 1.00
head big_factorial 2.298 ± 0.027 2.268 2.334 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.241 ± 0.021 2.223 2.282 1.00
head big_fibonacci 2.267 ± 0.087 2.204 2.496 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.562 ± 0.156 8.380 8.877 1.01 ± 0.02
head blake2s_integration_benchmark 8.497 ± 0.033 8.463 8.577 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.352 ± 0.026 2.320 2.412 1.01 ± 0.02
head compare_arrays_200000 2.336 ± 0.027 2.309 2.391 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.416 ± 0.009 1.406 1.435 1.00
head dict_integration_benchmark 1.443 ± 0.025 1.424 1.490 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.309 ± 0.010 1.294 1.331 1.00
head field_arithmetic_get_square_benchmark 1.319 ± 0.012 1.303 1.333 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.569 ± 0.089 8.390 8.638 1.00
head integration_builtins 8.606 ± 0.122 8.460 8.749 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.003 ± 0.385 8.664 9.642 1.01 ± 0.05
head keccak_integration_benchmark 8.876 ± 0.242 8.737 9.505 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.352 ± 0.017 2.331 2.374 1.01 ± 0.01
head linear_search 2.328 ± 0.016 2.314 2.367 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.586 ± 0.016 1.561 1.615 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.575 ± 0.017 1.550 1.604 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.443 ± 0.023 1.411 1.482 1.01 ± 0.02
head math_integration_benchmark 1.432 ± 0.012 1.418 1.451 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.273 ± 0.019 1.248 1.300 1.01 ± 0.02
head memory_integration_benchmark 1.265 ± 0.015 1.256 1.308 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.623 ± 0.025 1.603 1.683 1.01 ± 0.02
head operations_with_data_structures_benchmarks 1.609 ± 0.016 1.598 1.651 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 592.3 ± 3.7 589.1 602.0 1.00
head pedersen 596.8 ± 8.9 590.2 619.4 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 987.5 ± 10.8 978.6 1015.6 1.01 ± 0.01
head poseidon_integration_benchmark 982.3 ± 6.5 972.2 991.4 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.868 ± 0.012 1.859 1.897 1.00
head secp_integration_benchmark 1.887 ± 0.019 1.865 1.928 1.01 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 716.9 ± 3.7 712.5 724.6 1.00
head set_integration_benchmark 721.0 ± 4.7 716.6 728.9 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.652 ± 0.034 4.601 4.711 1.00
head uint256_integration_benchmark 4.700 ± 0.051 4.641 4.763 1.01 ± 0.01

github-actions[bot] avatar Mar 18 '24 20:03 github-actions[bot]

Codecov Report

Attention: Patch coverage is 22.91422% with 656 lines in your changes are missing coverage. Please review.

Project coverage is 94.96%. Comparing base (918d01c) to head (e80822f).

Files Patch % Lines
vm/src/vm/runners/builtin_runner/modulo.rs 0.00% 495 Missing :warning:
...nt_processor/builtin_hint_processor/mod_circuit.rs 0.00% 44 Missing :warning:
vm/src/vm/vm_core.rs 0.00% 32 Missing :warning:
vm/src/vm/runners/builtin_runner/mod.rs 77.38% 19 Missing :warning:
vm/src/vm/runners/cairo_runner.rs 33.33% 16 Missing :warning:
vm/src/math_utils/mod.rs 0.00% 13 Missing :warning:
vm/src/vm/vm_memory/memory.rs 0.00% 9 Missing :warning:
...src/types/instance_definitions/mod_instance_def.rs 0.00% 8 Missing :warning:
vm/src/types/relocatable.rs 20.00% 8 Missing :warning:
...int_processor/builtin_hint_processor_definition.rs 22.22% 7 Missing :warning:
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1673      +/-   ##
==========================================
- Coverage   96.56%   94.96%   -1.60%     
==========================================
  Files          96       99       +3     
  Lines       38488    38474      -14     
==========================================
- Hits        37166    36538     -628     
- Misses       1322     1936     +614     

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

codecov[bot] avatar Mar 26 '24 20:03 codecov[bot]