Skip to content

Commit 29ac262

Browse files
mvogttechclaude
andcommitted
refactor: unify ws_mask/ws_unmask via xor_impl function pointer
Replace duplicated SIMD bodies in ws_mask and ws_unmask with three static implementations (xor_scalar, xor_sse2, xor_avx2) sharing a common signature (src, dst, mask_ptr, mask32, length). A single xor_impl function pointer, set once at the end of _init_cpu_features, eliminates all per-call branches and the avx2_available global. ws_unmask passes buf as both src and dst for in-place XOR; ws_mask passes src and out+offset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fb663b8 commit 29ac262

1 file changed

Lines changed: 194 additions & 289 deletions

File tree

0 commit comments

Comments
 (0)