Skip to content

Comments

perf(precompile): zero-copy scalar conversion in BLS12-381 MSM#3359

Merged
rakita merged 1 commit intobluealloy:mainfrom
dizer-ti:perf/bls-msm-zero-copy-scalars
Jan 27, 2026
Merged

perf(precompile): zero-copy scalar conversion in BLS12-381 MSM#3359
rakita merged 1 commit intobluealloy:mainfrom
dizer-ti:perf/bls-msm-zero-copy-scalars

Conversation

@dizer-ti
Copy link
Contributor

Avoid allocating a temporary Vec when converting scalars to bytes in p1_msm/p2_msm.
blst_scalar is repr(C) with a single [u8; 32] field, so we can safely reinterpret the slice.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 27, 2026

Merging this PR will improve performance by 3.32%

⚡ 1 improved benchmark
✅ 172 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
transfer 14.5 µs 14.1 µs +3.32%

Comparing dizer-ti:perf/bls-msm-zero-copy-scalars (e8021c1) with main (087ac46)

Open in CodSpeed

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rakita rakita merged commit f3b74d4 into bluealloy:main Jan 27, 2026
31 checks passed
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
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