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

Add axuiliary serialize function #1451

Closed
wants to merge 1 commit into from
Closed

Conversation

Juan-M-V
Copy link
Contributor

Make Program serializable into a json string

Description

The aim of this PR is to make Program serializable. That way it can be converted to a json object. This is achieved by converting Program into a ProgramJson through the _program_to_json function.
Currently missing a conversion between hints for Program and ProgramJson

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.

@github-actions
Copy link

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 4.718 ± 0.046 4.671 4.844 1.00
head big_factorial 4.766 ± 0.023 4.734 4.804 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 3.943 ± 0.041 3.904 4.034 1.00
head big_fibonacci 3.980 ± 0.023 3.939 4.011 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 11.049 ± 0.077 10.916 11.169 1.00
head blake2s_integration_benchmark 11.148 ± 0.197 11.014 11.648 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 4.023 ± 0.025 3.995 4.072 1.00
head compare_arrays_200000 4.070 ± 0.062 4.033 4.240 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.676 ± 0.012 2.660 2.692 1.00
head dict_integration_benchmark 2.710 ± 0.010 2.701 2.733 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 2.008 ± 0.016 1.994 2.049 1.00
head field_arithmetic_get_square_benchmark 2.043 ± 0.042 2.007 2.116 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 11.005 ± 0.101 10.917 11.259 1.00 ± 0.01
head integration_builtins 10.997 ± 0.016 10.974 11.023 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 11.229 ± 0.018 11.205 11.256 1.00
head keccak_integration_benchmark 11.296 ± 0.069 11.161 11.375 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 4.009 ± 0.012 3.992 4.030 1.00
head linear_search 4.109 ± 0.135 4.019 4.376 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.901 ± 0.025 2.869 2.961 1.00
head math_cmp_and_pow_integration_benchmark 2.945 ± 0.045 2.916 3.068 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.635 ± 0.006 2.626 2.645 1.00
head math_integration_benchmark 2.664 ± 0.012 2.645 2.691 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.321 ± 0.006 2.314 2.331 1.00
head memory_integration_benchmark 2.341 ± 0.003 2.337 2.348 1.01 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.583 ± 0.044 2.554 2.679 1.00
head operations_with_data_structures_benchmarks 2.602 ± 0.008 2.591 2.616 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 937.5 ± 5.2 932.0 950.5 1.00
head pedersen 959.6 ± 25.8 938.6 1005.4 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.746 ± 0.005 1.740 1.754 1.01 ± 0.01
head poseidon_integration_benchmark 1.737 ± 0.010 1.730 1.764 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.330 ± 0.017 3.317 3.374 1.00
head secp_integration_benchmark 3.361 ± 0.008 3.352 3.372 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.939 ± 0.005 1.934 1.951 1.00
head set_integration_benchmark 2.000 ± 0.006 1.995 2.014 1.03 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 7.219 ± 0.013 7.201 7.242 1.00
head uint256_integration_benchmark 7.292 ± 0.097 7.238 7.564 1.01 ± 0.01

@pefontana
Copy link
Collaborator

Done here #1458

@pefontana pefontana closed this Oct 17, 2023
@pefontana pefontana deleted the serialize-program-to-json branch October 17, 2023 21:00
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.

2 participants