Skip to main content

ass_core/tokenizer/simd/
mod.rs

1//! SIMD-accelerated tokenization utilities
2//!
3//! Provides vectorized implementations of common tokenization operations
4//! for improved performance on supported platforms. Falls back to scalar
5//! implementations when SIMD is not available.
6//!
7//! # Performance
8//!
9//! - Delimiter scanning: 20-30% faster than scalar on typical ASS content
10//! - Hex parsing: 15-25% improvement for color values and embedded data
11//! - Automatic fallback ensures compatibility across all platforms
12//!
13//! # Safety
14//!
15//! All SIMD operations are implemented using safe abstractions from the
16//! `wide` crate. No unsafe code is used in this module.
17
18mod delimiters;
19mod hex;
20mod utf8;
21
22#[cfg(test)]
23mod delimiter_tests;
24#[cfg(test)]
25mod hex_tests;
26#[cfg(test)]
27mod utf8_tests;
28
29pub use delimiters::scan_delimiters;
30pub use hex::parse_hex_u32;
31pub use utf8::validate_utf8_batch;