Skip to main content

copy_bytes_simd

Function copy_bytes_simd 

Source
pub fn copy_bytes_simd(dst: &mut [u8], src: &[u8])
Expand description

Copy bytes from source to destination using SIMD when beneficial

Uses AVX2 SIMD for large arrays (>64 bytes), falls back to sequential copy for smaller arrays or non-AVX2 systems.

§Arguments

  • dst - Destination slice (must be at least as long as src)
  • src - Source slice

§Safety

Caller must ensure dst.len() >= src.len() to avoid buffer overflows.