Expand description
§crous-simd
Optional SIMD-accelerated routines for Crous encoding/decoding.
This crate provides optimized implementations of performance-critical operations. On aarch64 (Apple Silicon, etc.) it uses NEON intrinsics. On x86_64 it uses SSE2/AVX2 when available. All functions have scalar fallbacks for unsupported platforms.
§Feature flags
simd-varint— enable SIMD-accelerated varint boundary pre-scan. Idea: https://github.com/as-com/varint-simd
§Provided routines
batch_decode_varints— decode multiple LEB128 varints sequentiallybatch_decode_varints_simd— SIMD pre-scan variant (featuresimd-varint)find_byte— locate first occurrence of a byte (SIMD-accelerated)count_byte— count occurrences of a byte (SIMD-accelerated)find_non_ascii— locate first non-ASCII byte (for fast UTF-8 pre-scan)
Functions§
- batch_
decode_ total_ consumed - Total bytes consumed by a batch decode.
- batch_
decode_ varints - Batch-decode multiple varints from a contiguous buffer (scalar path).
- batch_
decode_ varints_ simd - Batch-decode varints using SIMD pre-scan to determine boundaries first.
- count_
byte - Count the number of occurrences of
needleindata. - find_
byte - Scan a byte slice for a specific byte using SIMD where available.
- find_
non_ ascii - Find the first byte with the high bit set (non-ASCII).