Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Linebender 5 min read Release mediumAdept

fearless_simd v0.7: 64-bit integers, improved generics, SSE2, and upcoming v1.0

fearless_simd v0.7 adds u64/i64 vector types, completing integer and float type coverage, plus dynamic byte shuffles via swizzle_dyn, wrapping/saturating widen-narrow conversions, and element shift/rotate helpers. Every operation is now exposed through traits for generic programming. An explicit SSE2 level replaces autovectorized scalar fallback on x86 when runtime dispatch is disabled. Build-time profiling kept from-scratch compilation at about 2s on x86 instead of 3.4s, and v1.0 is planned for early September with no breaking changes if the community raises no API concerns.

Assumes: SIMD basicsRust traits and genericsx86 instruction set extensions

Related posts

  • Fearless SIMD v1.0 is here

    Linebender easyNovice

    Fearless SIMD v1.0 is a Rust crate for SIMD with no ad-hoc unsafe code. Its safety rests on two small audited building blocks: a kernel! macro that uses target feature v1.1 to call intrinsics without unsafe, and a safe transmute module that covers loads and stores. It provides portable abstractions with precise and fast variants for platform-divergent edge cases, native-width vectors, and zero-overhead safe drop-down to intrinsics. A new #[simd] macro handles function multiversioning without inline(always) tuning. v1.0 comes with three years of security updates and is meant to complement std::simd, not compete with it.

  • Platform-independent SIMD in Go

    The Go Blog hardMaster

    Go 1.27 adds an experimental, size-agnostic `simd` package, loosely modeled on Highway for C++. It hides differences in vector width, masking schemes and instruction sets across AVX/AVX2/AVX512, NEON and wasm, and falls back to emulation on platforms without SIMD support. Vector types such as `simd.Float32s` have no fixed length; they load from and store to slices and expose only operations in the cross-platform intersection, with gaps filled by emulation. When an operation is missing, code can drop into the architecture-specific `archsimd` package via `ToArch()`/`FromArch`, and the compiler specializes away the type switch, as shown with a lookup-table popcount implementation for AVX/AVX2.

  • Arch-specific SIMD in Go

    The Go Blog hardMaster

    Go 1.27 extends the experimental architecture-specific SIMD API (simd/archsimd, enabled with GOEXPERIMENT=simd) from amd64 to arm64 NEON and wasm 128-bit SIMD. The design uses typed vector structs, readable method names unified across architectures, opaque mask types that the compiler peepholes into masked instructions, and new zero-cost reinterpretation methods (ToBits, ReshapeToUint<W>s) that replace Go 1.26's As<Type> methods. Worked examples reverse bits with GFNI affine transforms and transpose an 8x8 matrix with AVX2 lane-grouped permutes. Practical advice: guard code with CPU feature checks, which avoid SIGILL and also enable fused AVX-512 lowering; write loop bounds as i < len-n+1 so bounds checks are eliminated; and pass vectors as separate values rather than arrays or structs so they stay in registers.

  • Announcing Rust 1.99.0

    Rust Blog mediumAdept

    Rust 1.99.0 stabilizes defining C-ABI variadic functions in Rust using `...`, typed as `VaList` (ABI-compatible with C `va_list`) with readable types gated by the `VaArgSafe` trait. It also stabilizes `Layout::for_value_raw`, `mem::size_of_val_raw` and `mem::align_of_val_raw`, settling the safety rules for getting size and alignment from raw pointers to unsized types. The `Box::leak` docs now recommend against later deallocating leaked memory because it interacts badly with compiler optimizations and upcoming custom allocators, so `Box::into_raw` or `Box::into_non_null` should be used instead. Other stabilized APIs include `Vec::into_parts`/`from_parts`, `String::from_utf8_lossy_owned` and `std::fs::set_times`.

  • SIMD Matters

    Box2D hardMaster

    Box2D 3.0 solves contact constraints with SIMD by using greedy graph coloring to group constraints so no body appears twice within a color. Each color is split into 4- or 8-wide blocks for SSE2/Neon/AVX2, with body velocities gathered into wide structs and scattered back afterward. Colors persist across time steps using per-color body bitsets, and static bodies are excluded to keep the color count low. On a 5050-body pyramid benchmark, SSE2 is about 2x faster than scalar and AVX2 about 14% faster than SSE2, while compiler auto-vectorization of a scalar struct-of-floats fallback fails to match hand-written SSE2.

The quest for software engineering knowledge.

Look:
Layout: