Benchmarks
Benchmarked against equivalent C++ (g++ -O2) and Python 3.14. Best of 3 runs.
Visuall is within 1.1–2.8× of C++ on integer compute and loops, and 1.4× on deeply recursive code (Ackermann). The full benchmark suite runs ~1.9× slower than C++ overall — 20–50× faster than Python on numeric workloads. The escape analysis pass avoids GC heap allocation for non-escaping list, dict, tuple, and closure objects, eliminating GC overhead on allocation-heavy paths. Recent v1.3.2 GC optimizations (O(1) interior pointer resolution via chunk-indexed hash table) cut deep-stack GC pause times 86–133×.
Macro Benchmarks
| Test | C++ (ms) | Visuall (ms) | Python (ms) | V / C++ | Py / C++ |
|---|---|---|---|---|---|
| Primes (trial div, 100K ×3) | 6.9 | 12.7 | 241.6 | 1.8× | 35× |
| TreeSum (recursive, depth 22) | 8.2 | 35.6 | 645.9 | 4.3× | 79× |
| Collatz (1..100K) | 15.5 | 17.3 | 822.8 | 1.1× | 53× |
| Strings (200K f-strings) | 32.3 | 66.4 | 36.7 | 2.1× | 1.1× |
| Pi (Leibniz, 10M terms) | 10.7 | 15.1 | 781.0 | 1.4× | 73× |
| Nested loops (2000×2000) | 3.2 | 9.1 | 236.0 | 2.8× | 74× |
| Ackermann (3,11) | 851.6 | 1,192 | 26,918.0 | 1.4× | 32× |
| GCD sum (1..2000) | 45.8 | 51.1 | 863.8 | 1.1× | 19× |
| Fibonacci (fib(35) ×500K) | 5.7 | 7.3 | 728.4 | 1.3× | 128× |
| Float distance (1M) | 1.8 | 7.7 | 198.2 | 4.3× | 110× |
Micro Benchmarks
| Test | Iterations | C++ | Visuall | vs C++ | Python |
|---|---|---|---|---|---|
| Match dispatch | 1M | 7.5 ms | 6.6 ms | 0.9× | 269 ms |
| Function call | 1M | 4.8 ms | 11.0 ms | 2.3× | 252 ms |
| Tight loop sum | 100K | 5.9 ms | 11.0 ms | 1.9× | 144 ms |
All tests run against equivalent C++ compiled with g++ -O2 and Python 3.14.
Best of 3 runs reported. Test machine: Thinkpad E16 with Windows 11; these are README benchmarks.
Benchmarks updated for Visuall v1.3.2.