You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specializes pack 1/8/16/32 and unpack 8/16/32 with 256-bit kernels;
other widths delegate to SseBackend with byte-identical output.
Bench shows 6-8x pack speedup at widths 8 and 16.
CI extended: release-mode tests, miri (scalar via cfg(miri)),
macOS/Windows matrix, fuzz no longer masks crashes (300s/target).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.2.0] - 2026-04-13
9
+
10
+
### Added
11
+
- AVX2 backend (`Avx2Backend` in `src/simd/avx2.rs`) with native 256-bit kernels for widths 1 (pack), 4 (unpack), 8, 16, and 32. All other widths delegate to `SseBackend`, preserving byte-identical output across backends.
12
+
- Dispatch routing: `BackendType::Avx2` now resolves to `Avx2Backend` (was previously falling through to SSE). `BackendType::Avx512` falls through to `Avx2Backend` until a dedicated AVX-512 kernel ships.
13
+
- AVX2-internal tests: byte-for-byte SSE compatibility, scalar parity, roundtrip, boundary patterns, and invalid-input handling, all gated on `is_x86_feature_detected!("avx2")`.
14
+
- AVX2 column added to `benches/throughput_comparison.rs` for direct scalar/SSE/AVX2 comparison.
15
+
-`cfg(miri)` override in `dispatch::detect_best_backend` so `cargo miri test` exercises the scalar backend without choking on x86 SIMD intrinsics.
16
+
- CI matrix expanded to test on Linux, macOS, and Windows; release-mode test job added.
17
+
- CI now fails on fuzz crashes (previously masked with `|| true`); fuzz duration bumped from 60s to 300s per target.
18
+
19
+
### Changed
20
+
- Lane-crossing handling: every `_mm256_packus_epi*` is followed by `_mm256_permute4x64_epi64::<0xD8>` to restore linear in-memory order, ensuring AVX2 output is byte-identical to SSE/scalar.
21
+
- Doc comments in `compress`, `decompress`, and `lib.rs` now mention AVX2 alongside SSE4.1.
22
+
-`internal::SseBackend` re-export is now gated on `target_arch = "x86_64"` so the crate compiles on non-x86_64 targets (aarch64, wasm32, etc.).
> **Note:** This release includes the **Scalar** and **SSE4.1** backends only. AVX2 and AVX-512 implementations are planned for a future release. On x86_64 CPUs with SSE4.1, the SSE4.1 backend is used automatically.
10
-
11
-
High-performance BP128 compression for `u32` integer arrays with **SIMD acceleration**, **zero-allocation APIs**, and **deterministic encoding**.
9
+
High-performance BP128 compression for `u32` integer arrays with **SIMD acceleration**, **zero-allocation APIs**, and **deterministic encoding**. The crate ships **scalar**, **SSE4.1**, and **AVX2** backends and selects the best one at runtime. AVX-512 is planned for a future release.
12
10
13
11
## Overview
14
12
@@ -25,7 +23,7 @@ High-performance BP128 compression for `u32` integer arrays with **SIMD accelera
25
23
## Features
26
24
27
25
-**BP128 Algorithm** — Variable bit-width packing, 128 values per block
28
-
-**SIMD Acceleration** — SSE4.1 on x86_64 with automatic runtime detection
26
+
-**SIMD Acceleration** — AVX2 and SSE4.1 on x86_64 with automatic runtime detection
29
27
-**Scalar Fallback** — Reference implementation for non-SIMD targets
30
28
-**Zero-Allocation API** — `compress_into` / `decompress_into` with pre-allocated buffers
31
29
-**Fast Header Inspection** — `decompressed_len` reads size without decompressing
@@ -38,7 +36,7 @@ High-performance BP128 compression for `u32` integer arrays with **SIMD accelera
38
36
39
37
```toml
40
38
[dependencies]
41
-
packsimd = "0.1"
39
+
packsimd = "0.2"
42
40
```
43
41
44
42
## Quick Start
@@ -99,7 +97,7 @@ For complete API reference and usage examples, see [USAGE.md](USAGE.md).
99
97
│ │ │
100
98
┌────┴────┐ ┌─────┴─────┐ ┌────┴────┐
101
99
│ Scalar │ │ SSE4.1 │ │ AVX2 │
102
-
│Backend │ │ Backend │ │(planned)│
100
+
│Backend │ │ Backend │ │ Backend │
103
101
│ │ │ │ │ │
104
102
│Reference│ │ 128-bit │ │ 256-bit │
105
103
│ impl │ │ SIMD │ │ SIMD │
@@ -114,6 +112,7 @@ For complete API reference and usage examples, see [USAGE.md](USAGE.md).
114
112
|**dispatch**| Runtime SIMD backend selection and caching |
115
113
|**simd/scalar**| Reference scalar implementation (all bit widths) |
0 commit comments