Idiomatic Koru Kernels Match Hand-Specialized C
a day ago
- #Benchmarking
- #High-Performance Computing
- #Koru
- Benchmark results show Koru's fused n-body kernel performs as well as hand-specialized C, beating plain C, Zig, and Rust references by 12–17%.
- Koru kernels use semantic information to optimize code implicitly, avoiding manual techniques like restrict hints, scalarization, or -ffast-math flags.
- Robert Smith's kernel DSL in Common Lisp validated the kernel abstraction's portability and performance, matching C on x86-64 with SIMD optimizations.
- Koru's compiler leverages LLVM for cross-platform auto-vectorization, while the Lisp DSL required architecture-specific SIMD hand-coding.
- Koru's flow layer is declarative, enabling seamless composition of kernels with other constructs, a challenge in imperative languages like Lisp.