slovo/benchmarks/parse-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

Parse Loop Benchmark Scaffold

Release: exp-40; Common Lisp/SBCL comparison added by exp-41; hot-loop mode added by exp-42.

This benchmark compares repeated signed decimal i32 parsing 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 345000001 for loop count 1000000 and parse text 12345. Hot-loop mode uses loop count 10000000 and checksum 450000001. The runner supplies the loop count and parse text 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.
  • The parse implementations are intentionally comparable by input and checksum, not identical by parser internals: Slovo uses std.string.parse_i32_result, C uses strtol, Rust uses parse::<i32>(), Python uses int, Clojure uses Integer/parseInt, and Common Lisp uses parse-integer.

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.