31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
# Branch Loop Benchmark Scaffold
|
|
|
|
Release: `exp-40`; Common Lisp/SBCL comparison added by `exp-41`; hot-loop
|
|
mode added by `exp-42`.
|
|
|
|
This benchmark compares a deterministic branch-heavy integer loop across
|
|
Slovo, C, Rust, Python, Clojure, and Common Lisp/SBCL on the same machine.
|
|
|
|
It is not a published benchmark result, performance threshold, optimizer
|
|
claim, or cross-machine comparison.
|
|
|
|
All implementations print checksum `1185071` for loop count `1000000`.
|
|
Hot-loop mode uses loop count `10000000` and checksum `220775`. The runner
|
|
supplies the loop count at runtime.
|
|
|
|
## Comparison Method
|
|
|
|
- The runner builds each implementation once before timing. The reported
|
|
numbers measure execution only, not compile time.
|
|
- Slovo timings use `glagol build`, which currently lowers to LLVM and then
|
|
invokes host `clang -O2` with `runtime/runtime.c`.
|
|
- C timings use `clang -O2 -std=c11`.
|
|
- Rust timings use `rustc -C opt-level=3 -C debuginfo=0`.
|
|
|
|
Timing is cold-process local-machine evidence only. Clojure timings include
|
|
JVM and Clojure startup, while Common Lisp timings include SBCL script
|
|
startup.
|
|
|
|
Hot-loop mode is startup-amortized local evidence. It reports total time plus
|
|
normalized time for the base `1000000` loop count.
|