feat: add opt-in SIMD paths and release verification - #1
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds opt-in nightly SIMD operations, expanded CI coverage, and release-package verification.
Changes:
- Adds SIMD conversions and arithmetic with scalar fallbacks.
- Declares Rust 1.85 MSRV and expands platform/no_std/nightly testing.
- Adds extracted-package and release validation workflows.
- Critical: Release validation must bind the tag to the immutable release event SHA.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Summary |
|---|---|
src/simd.rs |
SIMD APIs, fallback logic, and tests |
src/lib.rs |
SIMD module integration |
README.md |
Feature and release documentation |
ci/publish-dry-run.sh |
Extracted-package verification |
ci/check-release.sh |
Release tag validation; requires immutable SHA verification |
Cargo.toml |
MSRV and feature definitions |
benches/arithmetic.rs |
SIMD benchmarks |
.gitignore |
Ignores macOS metadata |
.github/workflows/publish.yml |
Verified crates.io publishing |
.github/workflows/ci.yml |
Expanded CI coverage |
Suppressed comments (3)
benches/arithmetic.rs:530
- This scalar baseline invokes
black_boxonce per lane, while the SIMD baseline invokes it once for the whole slice. With 4,096 lanes this adds thousands of compiler barriers to the scalar timing and makes the comparison primarily measureblack_boxoverhead rather than decode throughput. Black-box the input slice once before iterating, as the SIMD benchmark does.
b.iter(|| {
for (source, output) in source.iter().zip(&mut output) {
*output = black_box(*source).to_f32();
benches/arithmetic.rs:586
- As in the UF16 decode baseline, this loop pays for one
black_boxbarrier per lane while the SIMD benchmark pays for one per slice. That makes the scalar UF32 result incomparable at 4,096 lanes; black-box the source slice once before the loop instead.
b.iter(|| {
for (source, output) in source.iter().zip(&mut output) {
*output = black_box(*source).to_f64();
benches/arithmetic.rs:558
- The scalar comparison black-boxes both operands for every lane, but the SIMD comparison black-boxes each input slice only once. This adds 8,192 barriers per iteration at the configured length and invalidates the reported scalar-vs-SIMD speedup. Black-box the two slices once and read the lanes normally inside the loop.
b.iter(|| {
for ((left, right), output) in left.iter().zip(&right).zip(&mut output) {
*output = black_box(*left) + black_box(*right);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+22
to
+26
| tag_commit="$(git rev-parse --verify "$tag^{commit}")" | ||
| head_commit="$(git rev-parse HEAD)" | ||
| if [[ "$tag_commit" != "$head_commit" ]]; then | ||
| echo "release tag $tag resolves to $tag_commit, not checked-out commit $head_commit" >&2 | ||
| exit 1 |
micro-perceptron
approved these changes
Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Trusted-publisher setup
After this PR merges, configure the crate on crates.io with GitHub owner MicroPerceptron, repository ufloat, and workflow filename publish.yml. The workflow runs for published GitHub Releases and permits OIDC only on its publish job.
Validation
The stable jobs intentionally exclude the benchmark target because it uses nightly's test feature; the nightly all-target gate covers it.