slovo/benchmarks/branch-loop
2026-05-22 08:38:43 +02:00
..
c Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
clojure Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
common-lisp Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
python Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
rust Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
src Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
.gitignore Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
benchmark.json Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
README.md Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
run.py Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00
slovo.toml Import Slovo 1.0.0-beta monorepo 2026-05-22 08:38:43 +02:00

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.