Proof of Concept created with AssemblyScript, WASM and Node.js.
Using these technologies:
- AssemblyScript
- JavaScript
- WebAssembly
- SIMD
- Node.js 22
- Original Input (
v128.load) - Detect Letters (
isLettermask) - Extract Case Bit (
caseBit = chunk & 0x20) - Normalize to Uppercase (
val = chunk & 0x5F) - Apply Shift (
shifted = val + 3) - Wrap Underflow (if < 65, add 26)
- Wrap Overflow (if > 90, subtract 26)
- Restore Case (
result = shifted | caseBit) - Preserve Non-letters (bitselect)
The visual of the algorithm is available as a local webpage.
npm run vizImagine you have to pack 16 lunchboxes with sandwiches.
Instead of making one sandwich at a time (like a normal computer), SIMD (Single Instruction, Multiple Data) lets you use one instruction to make all 16 sandwiches at the exact same time.
It's a way for the computer's processor to do the same operation on many pieces of data simultaneously, which makes complex tasks like video processing or cipher encoding much faster.
The SIMD tripling of four 8-bit numbers. The CPU loads 4 numbers at once, multiplies them all in one SIMD-multiplication, and saves them all at once back to RAM. In theory, the speed can be multiplied by 4.
In the repo root folder level use this command:
npm install
npm asbuild
npm startPlease check out LICENSE and NOTICE file.
- Frontend Masters: Web Assembly (Wasm)
- Wasm By Example
- AssemblyScript Documentation
- WebAssembly Official Site
- Angular
- Node.js
- 7th October 2025: Refactored SIMD code to be branchless, Visualization
- 6th October 2025: Initial working PoC

