Skip to content

v2.1.5 — Bug Fix Release

Choose a tag to compare

@bindiego bindiego released this 27 Mar 06:35
· 65 commits to main since this release

Bug Fixes

  • fix(soundness): MmapVec unsound deserialization — Changed T: Copy + 'static to T: bytemuck::Pod + 'static on all MmapVec<T> impl blocks. Pod guarantees every bit pattern is valid for T, preventing UB when reading memory-mapped files with corrupted or arbitrary byte contents. MmapVec<bool>, MmapVec<NonZeroU32>, etc. are now rejected at compile time.

  • fix(perf): FastVec insert/remove redundant heap allocations — Removed heap-allocated bounce buffer (vec![0; N] + two SIMD copies) from insert and remove methods. Replaced with std::ptr::copy which handles overlapping memory natively via LLVM/glibc-optimized memmove. Eliminates ~50-100ns malloc overhead per call and halves memory bandwidth.

  • fix: removed dead SIMD copy module — Removed src/io/simd_memory/copy.rs (1,349 LOC). Benchmarks showed the custom SIMD copy was slower than std::copy_from_slice at all buffer sizes. Kept the SIMD search module which provides real speedups (2-8x).

  • fix: doctest failures — Fixed 4 pre-existing doctest failures in valvec32.rs (type ambiguity) and numeric_compare.rs (missing import). All 215 doctests now pass.

Documentation

  • Verified performance table with accurate benchmark numbers on AMD EPYC 7B13
  • Added search engine integration guide with code examples

Test Results

  • 2,218 debug + 2,229 release lib tests passing
  • 215 doctests passing (was 211 with 4 failures)
  • 3 new soundness regression tests for MmapVec<T> Pod bound

Full Changelog: v2.1.4...v2.1.5