Skip to content

Conversation

@jotabulacios
Copy link
Contributor

@jotabulacios jotabulacios commented Nov 29, 2024

Add Bench for Babybear

Description

This PR adds benchmarks for BabyBear field arithmetic operations in both the base field and its degree-4 extension field.

Results for 1 million operations

Operation Lambdaworks Plonky3 Speedup
Addition 610.68 µs 629.35 µs 2.97%
Multiplication 747.44 µs 701.59 µs -6.53%
Squaring 1.0284 ms 612.02 µs -68.03%
Division 138.03 ms 84.085 ms -64.16%
Inversion 139.71 ms 80.817 ms -72.87%
Addition Fp4 877.75 µs 529.44 µs -65.79%
Multiplication Fp4 14.218 ms 12.625 ms -12.62%
Squaring Fp4 10.603 ms 12.177 ms 12.93%
Division Fp4 168.18 ms 188.82 ms 10.93%
Inversion Fp4 193.61 ms 162.75 ms -18.96%

Checklist

  • Benchmarks added/run

@jotabulacios jotabulacios requested a review from a team as a code owner November 29, 2024 20:27
@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.32%. Comparing base (6fb54a2) to head (a7eaf33).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #947   +/-   ##
=======================================
  Coverage   71.32%   71.32%           
=======================================
  Files         155      155           
  Lines       33537    33537           
=======================================
  Hits        23920    23920           
  Misses       9617     9617           

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

Base automatically changed from baby-bear-extension to main December 11, 2024 21:17
@jotabulacios
Copy link
Contributor Author

This PR is redundant with #956 since it implements the same benchmarks when comparing the operations in u64 and u32

@diegokingston diegokingston deleted the bench_babybear branch March 20, 2025 13:41
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