JavaScript
5 articles on JavaScript from Ayoob AI, the full code AI automation agency based in Newcastle upon Tyne.
Bypassing Array.prototype.sort() with IEEE 754 Bit-Transforms
V8's TimSort coerces numbers to strings and cannot use parallel hardware. Our Adaptive Multi-Tier Sorting System transforms IEEE 754 floats to sort-order-preserving unsigned integers using two bitwise operations, enabling radix-256 sort on CPU workers and a two-phase GPU bitonic-merge sort with 1.45x speedup over Web Workers at 5M+ elements on discrete GPU.
Why We Built the First Non-Comparison Float Sort in JavaScript (And Open Sourced It)
Array.prototype.sort() is broken for numerical data. We built a three-tier adaptive sorting engine that dispatches between CPU, Web Workers, and WebGPU compute shaders based on dataset characteristics. Here is why, and how.
Zero-Copy Parallel Processing with SharedArrayBuffer in JavaScript
Zero-copy parallel AI compute in a browser, using every CPU core. How Newcastle SMBs get server-grade performance on standard laptops.
The Hidden Compute Costs of Array.prototype.sort() in Enterprise SaaS
V8's TimSort performs 20 million comparator callbacks per million elements, each crossing the native-to-JS boundary. Our adaptive sorting system bypasses this entirely with IEEE 754 bit-transforms and a two-phase GPU sort: local bitonic in shared memory, global rank merge via parallel binary search.
IEEE 754 Bit-Transforms for High-Speed Float Processing in JavaScript
JavaScript uses Float64. WebGPU requires Float32. The IEEE 754 bit-transform (Herf 2001) converts floats to sort-order-preserving unsigned integers. Our contribution is the Float32 safety guard that inhibits GPU dispatch when Float64-to-Float32 truncation would alter sort order, plus the adaptive multi-tier dispatch system.
Want to discuss javascript for your business?
Book a Discovery Call