This SDK is deliberately smaller than Python or Rust. Its job is to make the hot vector kernels easy to use from modern JavaScript runtimes.
TypedArray-first API. Standard Float32Array, Float64Array, Int8Array, and Uint8Array work directly. DType tags for exotic storage. f16, bf16, fp8, and packed bits stay explicit. Owned and borrowed views. Vector, VectorView, and base tensor wrappers preserve dtype metadata. Portable runtime story. The same package can target native addons and WASM runtimes. No fake tensor-framework scope. This binding stays centered on the vector families it actually exports.
§ Ecosystem Comparison
| Feature | NumKong | mathjs | tensorflow.js |
|---|---|---|---|
| Operation families | dots, distances, binary, probability, cast, packed, symmetric | general arithmetic, matrix ops, statistics | matmul, elementwise, reductions |
| Precision | BFloat16 through sub-byte; automatic widening; Kahan summation | Float64 only; standard accuracy | Float32 primarily; no sub-byte; standard accuracy |
| Runtime SIMD dispatch | auto-selects best ISA per-thread across x86, ARM, RISC-V | none; pure JS | fixed at build time via WASM SIMD or WebGL |
| Packed matrix, GEMM-like | dotsPack + dotsPacked; persistent packing; amortized | math.multiply — no persistent packing | tf.matMul — no persistent packing |
| Symmetric kernels, SYRK-like | dotsSymmetric; upper triangle only; row-range partitioning | no duplicate-pair skipping | no duplicate-pair skipping |
| WASM fallback | yes — portable, runs in browser without native addon | yes — pure JS, no native required | yes — also WebGL/WebGPU |
| Bundle size | small | moderate | large |