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

Log contract compilation time #823

Merged
merged 7 commits into from
Oct 18, 2024
Merged

Log contract compilation time #823

merged 7 commits into from
Oct 18, 2024

Conversation

JulianGCalderon
Copy link
Contributor

@JulianGCalderon JulianGCalderon commented Sep 30, 2024

Logs the time it takes in each compilation stage

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

Copy link

github-actions bot commented Sep 30, 2024

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 3.195 ± 0.032 3.132 3.234 1.02 ± 0.01
base factorial_2M.cairo (JIT) 3.171 ± 0.028 3.133 3.222 1.02 ± 0.01
head factorial_2M.cairo (AOT) 3.118 ± 0.019 3.096 3.145 1.00
base factorial_2M.cairo (AOT) 3.146 ± 0.033 3.103 3.211 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 2.702 ± 0.023 2.671 2.745 1.02 ± 0.01
base fib_2M.cairo (JIT) 2.703 ± 0.037 2.652 2.748 1.02 ± 0.02
head fib_2M.cairo (AOT) 2.666 ± 0.032 2.623 2.724 1.01 ± 0.01
base fib_2M.cairo (AOT) 2.639 ± 0.021 2.607 2.672 1.00
Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 3.008 ± 0.032 2.967 3.075 1.04 ± 0.01
base logistic_map.cairo (JIT) 3.061 ± 0.032 2.994 3.098 1.06 ± 0.01
head logistic_map.cairo (AOT) 2.885 ± 0.027 2.823 2.915 1.00
base logistic_map.cairo (AOT) 2.945 ± 0.035 2.895 3.000 1.02 ± 0.02

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.

Project coverage is 82.74%. Comparing base (0e251c5) to head (fd0fe3f).

Files with missing lines Patch % Lines
src/context.rs 88.88% 1 Missing ⚠️
src/ffi.rs 94.73% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #823   +/-   ##
=======================================
  Coverage   82.73%   82.74%           
=======================================
  Files         120      120           
  Lines       34937    34963   +26     
=======================================
+ Hits        28905    28929   +24     
- Misses       6032     6034    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JulianGCalderon JulianGCalderon force-pushed the time-compilation branch 3 times, most recently from 65aacd7 to fd40a47 Compare September 30, 2024 17:24
Copy link

github-actions bot commented Sep 30, 2024

Benchmark results Main vs HEAD

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 3.173 ± 0.022 3.140 3.207 1.01 ± 0.01
base factorial_2M.cairo (JIT) 3.155 ± 0.021 3.117 3.184 1.01 ± 0.01
head factorial_2M.cairo (AOT) 3.157 ± 0.018 3.130 3.180 1.01 ± 0.01
base factorial_2M.cairo (AOT) 3.130 ± 0.019 3.112 3.172 1.00
Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 2.722 ± 0.013 2.702 2.739 1.02 ± 0.01
base fib_2M.cairo (JIT) 2.702 ± 0.026 2.657 2.753 1.01 ± 0.01
head fib_2M.cairo (AOT) 2.692 ± 0.023 2.645 2.719 1.01 ± 0.01
base fib_2M.cairo (AOT) 2.669 ± 0.014 2.635 2.683 1.00
Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 3.123 ± 0.017 3.099 3.149 1.06 ± 0.01
base logistic_map.cairo (JIT) 3.102 ± 0.014 3.083 3.131 1.05 ± 0.01
head logistic_map.cairo (AOT) 2.998 ± 0.025 2.964 3.040 1.01 ± 0.01
base logistic_map.cairo (AOT) 2.957 ± 0.011 2.945 2.976 1.00

@JulianGCalderon JulianGCalderon changed the title [DNM?] Log contract compilation time Log contract compilation time Oct 10, 2024
Copy link

github-actions bot commented Oct 10, 2024

Benchmarking results

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 11.082 ± 0.286 10.773 11.513 23.57 ± 0.61
cairo-native (embedded AOT) 3.454 ± 0.045 3.380 3.521 7.34 ± 0.09
cairo-native (embedded JIT using LLVM's ORC Engine) 3.435 ± 0.037 3.395 3.508 7.30 ± 0.08
cairo-native (standalone AOT) 0.681 ± 0.004 0.678 0.693 1.45 ± 0.01
cairo-native (standalone AOT with -march=native) 0.470 ± 0.000 0.469 0.471 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 10.967 ± 0.320 10.518 11.462 1342.94 ± 41.98
cairo-native (embedded AOT) 2.805 ± 0.047 2.726 2.895 343.42 ± 6.93
cairo-native (embedded JIT using LLVM's ORC Engine) 2.833 ± 0.028 2.796 2.875 346.94 ± 5.22
cairo-native (standalone AOT) 0.009 ± 0.000 0.009 0.009 1.07 ± 0.02
cairo-native (standalone AOT with -march=native) 0.008 ± 0.000 0.008 0.009 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.461 ± 0.043 4.397 4.535 61.44 ± 0.66
cairo-native (embedded AOT) 3.023 ± 0.046 2.951 3.104 41.63 ± 0.67
cairo-native (embedded JIT using LLVM's ORC Engine) 3.186 ± 0.060 3.105 3.297 43.88 ± 0.85
cairo-native (standalone AOT) 0.112 ± 0.000 0.112 0.113 1.55 ± 0.01
cairo-native (standalone AOT with -march=native) 0.073 ± 0.000 0.072 0.074 1.00

@edg-l edg-l added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 4ba9e16 Oct 18, 2024
15 checks passed
@edg-l edg-l deleted the time-compilation branch October 18, 2024 15:02
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.

5 participants