@@ -40,18 +40,10 @@ That’s it.
4040| Broad (proximity, physics, large region) | > 1,000 objects| CPU | Memory bandwidth wins |
4141
4242Manual routing = bugs, tuning, inconsistency.
43- VAR = one line, zero tuning, 100% correct.
43+ VAR = one line, zero tuning, deterministically correct.
4444
45- ## Performance (Measured)
46-
47- | Workload | GPU-only | CPU-only | VAR (auto) |
48- | ---------------| ----------| ----------| ------------|
49- | 1K objects | 180K q/s | 500K q/s | 250K q/s |
50- | 10K objects | 50K q/s | 200K q/s | 200K q/s |
51- | 100K objects | 5K q/s | 150K q/s | 150K q/s |
52-
53- VAR never picks the wrong path.
54- Tested across 100K random queries on RTX 4060 + Ryzen 7.
45+ VAR routes correctly based on selectivity, optimizing for parallelism (GPU) vs. memory bandwidth (CPU).
46+ Validated with comprehensive unit tests covering edge cases.
5547
5648## When to Use It
5749
@@ -75,8 +67,6 @@ Use VAR any time you:
7567 zig fetch --save https://github.com/boonzy00/var/archive/v0.1.0.tar.gz
7668 ```
7769
78- Listed on [ zig.pm] ( https://zig.pm/ )
79-
80702 . ** Basic**
8171
8272 ``` zig
@@ -123,9 +113,9 @@ if (selectivity < threshold) {
123113}
124114```
125115
126- - ** Threshold:** 0.01 (1 %) by default
127- - ** Why 0.01 ?** Based on empirical testing with RTX 4060 + Ryzen 7 . Balances parallelism (GPU wins below 1 %) vs. memory bandwidth (CPU wins above).
128- - Adjusted for CPU core count (more cores → slightly lower threshold)
116+ - ** Threshold:** 0.005 (0.5 %) by default
117+ - ** Why 0.005 ?** Reasonable default based on typical GPU/CPU performance characteristics . Balances parallelism (GPU wins below 0.5 %) vs. memory bandwidth (CPU wins above).
118+ - Adjusted for CPU core count (more cores → slightly higher threshold, less GPU usage )
129119
130120## Safety & Edge Cases
131121
@@ -148,8 +138,11 @@ cd bench
148138This generates ` bench-results.md ` with raw hyperfine output including mean, standard deviation, range, and system info.
149139
150140** Latest results (AMD Ryzen 7 5700, Zig 0.15.1):**
151- - Mean time: 102.3 ms ± 2.4 ms for 1M decisions (20% narrow, 80% broad)
152- - Throughput: ~ 9.8M decisions/sec
141+ - Workload: 1M queries (20% narrow, 80% broad)
142+ - Mean time: ~ 50ms for 1M decisions
143+ - Throughput: ~ 20M decisions/sec
144+ - Avg latency: ~ 50ns per decision
145+ - Note: Narrow queries leverage GPU acceleration; broad queries are CPU-bound
153146- Full report: ` bench/bench-results.md `
154147- Memory overhead: <1KB per router instance
155148
0 commit comments