VAR v1.2.0 – 17 Nov 2025
What changed
- Runtime CPU feature detection in
VAR.init(null)
Checks for AVX2 on x86_64, NEON on aarch64, falls back to scalar otherwise. No compile-time flags needed anymore. - Added NEON implementation for aarch64 (routeBatch uses 4×f32 vectors when available)
- Batch functions now dispatch to the correct implementation at runtime (scalar / AVX2 / NEON)
- Added optional auto-tuning of the GPU threshold
When.auto_tune = true, raises the threshold slightly on machines with >16 cores to reduce cache pressure on large servers. Default remains off (fixed 1 %). - New small example in README: 1000-drone swarm collision avoidance using cone volumes
- Fixed benchmark executable name in run_bench.sh and added a
--force-pathflag for manual testing - Updated performance table with real numbers from my Ryzen 7 5700
On this particular CPU the vector path ended up at ~0.17 B/sec (same as scalar). No measurable speedup here—keeps the numbers honest.
Usage is unchanged
const router = VAR.init(null); // automatically picks the best available pathAll existing safety behaviour (divide-by-zero guard, negative volumes → CPU, etc.) still applies on every code path.
Benchmark table (run_bench.sh, same methodology as before)
| Machine | Scalar | Vector path |
|---|---|---|
| Ryzen 7 5700G | ~0.17 B/sec | ~0.17 B/sec (AVX2) |
(NEON numbers will be added once I get clean runs on ARM hardware)
Install / upgrade exactly as before:
zig fetch --save https://github.com/boonzy00/var/archive/v1.2.0.tar.gzFeedback welcome, especially from anyone running on recent ARM boxes or bigger Zen CPUs.
That’s all for this release.