Files
Jarred Sumner 8ed853c8d1 feat: add Bun.indexOfFirstDifference() for SIMD-accelerated TypedArray comparison
Adds a new `Bun.indexOfFirstDifference(a, b)` function that returns the index
of the first element where `a[i] !== b[i]`, comparing up to `min(a.length, b.length)`
elements. Returns the minimum length if the compared prefix is identical.

- Uses Google Highway SIMD library for fast byte-level comparison
- Converts byte offsets back to element indices for multi-byte TypedArrays
- Supports all integer TypedArray types (Uint8, Int8, Uint8Clamped, Uint16,
  Int16, Uint32, Int32, BigInt64, BigUint64)
- Rejects float arrays (Float16/32/64) since NaN !== NaN and NaN has
  multiple bit representations
- Validates same-type requirement and handles detached buffers
2026-01-26 20:32:46 -08:00
..