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

Fix theoretical lockfile data race. #1087

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Conversation

azteca1998
Copy link
Collaborator

Fix a theoretical data race in lockfiles.

Checklist

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

@azteca1998 azteca1998 marked this pull request as ready for review February 6, 2025 15:47
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.05%. Comparing base (0a33cb3) to head (5ec4787).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1087   +/-   ##
=======================================
  Coverage   81.05%   81.05%           
=======================================
  Files         108      108           
  Lines       29726    29722    -4     
=======================================
- Hits        24094    24091    -3     
+ Misses       5632     5631    -1     

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

Copy link

github-actions bot commented Feb 6, 2025

Benchmark results Main vs HEAD.

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_insert.cairo (JIT) 4.379 ± 0.060 4.299 4.516 1.06 ± 0.02
base dict_insert.cairo (AOT) 4.122 ± 0.063 4.027 4.217 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_insert.cairo (JIT) 3.875 ± 0.025 3.846 3.929 1.00
head dict_insert.cairo (AOT) 3.910 ± 0.087 3.794 4.040 1.01 ± 0.02

Base

Command Mean [s] Min [s] Max [s] Relative
base dict_snapshot.cairo (JIT) 4.095 ± 0.064 3.966 4.210 1.03 ± 0.02
base dict_snapshot.cairo (AOT) 3.986 ± 0.045 3.895 4.041 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head dict_snapshot.cairo (JIT) 3.936 ± 0.057 3.817 4.028 1.03 ± 0.02
head dict_snapshot.cairo (AOT) 3.836 ± 0.064 3.729 3.919 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base factorial_2M.cairo (JIT) 4.421 ± 0.055 4.335 4.503 1.00 ± 0.01
base factorial_2M.cairo (AOT) 4.404 ± 0.035 4.353 4.461 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 4.282 ± 0.041 4.208 4.336 1.02 ± 0.01
head factorial_2M.cairo (AOT) 4.183 ± 0.046 4.087 4.229 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base fib_2M.cairo (JIT) 3.975 ± 0.051 3.889 4.058 1.02 ± 0.02
base fib_2M.cairo (AOT) 3.891 ± 0.056 3.800 3.961 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 3.749 ± 0.045 3.674 3.806 1.00 ± 0.01
head fib_2M.cairo (AOT) 3.734 ± 0.032 3.675 3.774 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base linear_search.cairo (JIT) 4.165 ± 0.064 4.095 4.303 1.03 ± 0.02
base linear_search.cairo (AOT) 4.038 ± 0.049 3.969 4.116 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head linear_search.cairo (JIT) 3.955 ± 0.035 3.895 4.018 1.07 ± 0.01
head linear_search.cairo (AOT) 3.713 ± 0.021 3.666 3.746 1.00

Base

Command Mean [s] Min [s] Max [s] Relative
base logistic_map.cairo (JIT) 4.239 ± 0.032 4.183 4.278 1.03 ± 0.01
base logistic_map.cairo (AOT) 4.115 ± 0.037 4.067 4.202 1.00

Head

Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 3.928 ± 0.037 3.884 3.993 1.05 ± 0.01
head logistic_map.cairo (AOT) 3.757 ± 0.038 3.718 3.829 1.00

Copy link

github-actions bot commented Feb 6, 2025

Benchmarking results

Benchmark for program dict_insert

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 20.740 ± 0.164 20.549 20.981 5.53 ± 0.07
cairo-native (embedded AOT) 3.752 ± 0.040 3.691 3.825 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.818 ± 0.024 3.780 3.848 1.02 ± 0.01

Benchmark for program dict_snapshot

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.824 ± 0.018 5.798 5.851 1.61 ± 0.02
cairo-native (embedded AOT) 3.616 ± 0.039 3.578 3.716 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.704 ± 0.022 3.677 3.752 1.02 ± 0.01

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.338 ± 0.045 14.265 14.408 3.57 ± 0.03
cairo-native (embedded AOT) 4.020 ± 0.028 3.988 4.065 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 4.043 ± 0.038 3.996 4.124 1.01 ± 0.01

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 14.240 ± 0.032 14.187 14.286 4.01 ± 0.03
cairo-native (embedded AOT) 3.554 ± 0.022 3.529 3.599 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.603 ± 0.039 3.550 3.672 1.01 ± 0.01

Benchmark for program linear_search

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.851 ± 0.037 5.776 5.898 1.61 ± 0.02
cairo-native (embedded AOT) 3.640 ± 0.025 3.605 3.690 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.780 ± 0.039 3.730 3.856 1.04 ± 0.01

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 5.758 ± 0.031 5.713 5.803 1.55 ± 0.01
cairo-native (embedded AOT) 3.705 ± 0.014 3.689 3.734 1.00
cairo-native (embedded JIT using LLVM's ORC Engine) 3.899 ± 0.029 3.852 3.933 1.05 ± 0.01

@azteca1998 azteca1998 added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit d1c37ab Feb 7, 2025
28 checks passed
@azteca1998 azteca1998 deleted the fix-theoretical-lockfile-race branch February 7, 2025 15:39
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.

4 participants