simd-optimize

Generate platform-specific SIMD intrinsics for x86 and ARM Rust code.

2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/ahrav/scratch-scanner-rs --skill simd-optimize
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simd-optimize
Source: https://github.com/ahrav/scratch-scanner-rs/tree/main/.claude/skills/simd-optimize
Command: npx skills add https://github.com/ahrav/scratch-scanner-rs --skill simd-optimize

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cargo-show-asm, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill optimizes Rust code by automatically identifying and implementing Single Instruction, Multiple Data (SIMD) vectorization, significantly boosting performance for data-parallel computations.

Core Features & Use Cases

  • Automated SIMD Implementation: Detects hardware ISA features, analyzes code for vectorizable patterns, and generates platform-specific intrinsics (x86 SSE/AVX, ARM NEON/SVE).
  • Performance Validation: Includes correctness and performance validation using property-based testing and benchmarking.
  • Use Case: Optimize a critical loop in your Rust application that processes large arrays of numbers, turning a CPU bottleneck into a high-throughput data processing pipeline.

Quick Start

Use the simd-optimize skill to vectorize the byte search loop in src/scanner/byte_search.rs.

Frequently Asked Questions about simd-optimize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply SIMD vectorization to speed up a Rust loop?

SIMD vectorization optimizes Rust code by identifying data-parallel patterns and generating platform-specific intrinsics for x86 (SSE, AVX) and ARM (NEON, SVE) architectures. This Skill automates detection, intrinsics generation, and performance validation for critical processing loops.

What is the best way to optimize Rust array processing for multiple CPU architectures?

Optimizing Rust array processing requires generating platform-specific intrinsics like x86 AVX-512 and ARM SVE. This Skill detects hardware ISA features and provides tiered research with fallback mechanisms to ensure broad architectural compatibility and maximum throughput.

Does this Rust optimization approach support both x86 AVX and ARM NEON intrinsics?

Yes, this SIMD optimization approach supports both x86 and ARM platforms. It generates specific intrinsics for x86 architectures including SSE, AVX, and AVX-512, as well as ARM architectures featuring NEON and SVE instruction sets.

How do I validate correctness and performance after writing SIMD intrinsics in Rust?

Validate SIMD intrinsics in Rust by using property-based testing and benchmarking to compare vectorized output against scalar code. This Skill includes performance validation mechanisms to ensure the optimized intrinsics maintain correctness while delivering measurable speed improvements.

Do I need cargo-show-asm to inspect Rust SIMD vectorization?

Yes, cargo-show-asm is a required dependency to inspect assembly output and verify SIMD vectorization in Rust. It allows you to analyze the generated intrinsics and ensure the compiler effectively applies x86 or ARM instructions to your scalar code.

When should I not use manual SIMD intrinsics for Rust performance optimization?

Manual SIMD intrinsics may not be suitable for Rust code lacking data-parallel patterns or when cross-platform portability outweighs raw speed. If the computation cannot be structured into large arrays of numbers, the complex intrinsics implementation will not yield meaningful throughput improvements.