pub struct SimdUtils;
Expand description
SIMD-accelerated data parsing utilities
Implementations§
Source§impl SimdUtils
impl SimdUtils
Sourcepub fn fast_bytes_equal(a: &[u8], b: &[u8]) -> bool
pub fn fast_bytes_equal(a: &[u8], b: &[u8]) -> bool
SIMD-accelerated byte array comparison For arrays with length >= 16, uses SIMD instructions for fast comparison
Sourcepub fn fast_discriminator_match(data: &[u8], discriminator: &[u8]) -> bool
pub fn fast_discriminator_match(data: &[u8], discriminator: &[u8]) -> bool
Fast discriminator matching, specifically for instruction discriminator comparison
Sourcepub fn find_pattern_simd(haystack: &[u8], needle: &[u8]) -> Option<usize>
pub fn find_pattern_simd(haystack: &[u8], needle: &[u8]) -> Option<usize>
SIMD-accelerated memory search to find specific patterns in data
Sourcepub fn validate_data_format(data: &[u8], min_length: usize) -> bool
pub fn validate_data_format(data: &[u8], min_length: usize) -> bool
SIMD-accelerated data validation to check if data conforms to specific format
Sourcepub fn fast_checksum(data: &[u8]) -> u32
pub fn fast_checksum(data: &[u8]) -> u32
Fast checksum calculation (maintains API consistency)
Sourcepub fn fast_copy(src: &[u8], dst: &mut [u8])
pub fn fast_copy(src: &[u8], dst: &mut [u8])
SIMD-accelerated data copy (for large data blocks)
Sourcepub fn validate_account_indices_simd(
indices: &[u8],
account_count: usize,
) -> bool
pub fn validate_account_indices_simd( indices: &[u8], account_count: usize, ) -> bool
SIMD-accelerated account indices validation Validates that all indices in the account index array are less than the total account count
Auto Trait Implementations§
impl Freeze for SimdUtils
impl RefUnwindSafe for SimdUtils
impl Send for SimdUtils
impl Sync for SimdUtils
impl Unpin for SimdUtils
impl UnwindSafe for SimdUtils
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request