Archived
d3495476f4
El SDK Release / build-and-release (push) Failing after 13m0s
The generated C, amalgams, vendored runtime pins, and compiled binaries from the Claude Code era are removed from the worktree. The El sources survive; this tree is now source-only for the first-principles rebuild. Per Principal direction 2026-08-19.
46 lines
2.2 KiB
Bash
46 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
# time07b.sh — second, larger re-measurement of cycle 07 P3, two workloads.
|
|
# Same construction as time07.sh: gen2-self-emitted binaries at bc2f26d^ and bc2f26d,
|
|
# identical inputs, interleaved runs.
|
|
set -uo pipefail
|
|
N="${1:-21}"
|
|
cd /tmp/rerun-v1-07/lang || exit 1
|
|
|
|
now() { python3 -c 'import time;print(time.perf_counter())'; }
|
|
|
|
bench() { # $1 = label ; $2.. = args passed to each binary
|
|
local label="$1"; shift
|
|
local P=() C=() i s e
|
|
"$@" >/dev/null 2>&1 <<<"" || true
|
|
/tmp/elc07pb "$@" >/dev/null 2>&1; /tmp/elc07b "$@" >/dev/null 2>&1 # warm
|
|
for i in $(seq 1 "$N"); do
|
|
s=$(now); /tmp/elc07pb "$@" >/dev/null 2>&1; e=$(now)
|
|
P+=("$(python3 -c "print(f'{$e-$s:.5f}')")")
|
|
s=$(now); /tmp/elc07b "$@" >/dev/null 2>&1; e=$(now)
|
|
C+=("$(python3 -c "print(f'{$e-$s:.5f}')")")
|
|
done
|
|
echo "### workload: $label (args: $*)"
|
|
echo "parent bc2f26d^ : ${P[*]}"
|
|
echo "commit bc2f26d : ${C[*]}"
|
|
python3 - "$N" "${P[@]}" "${C[@]}" <<'PY'
|
|
import sys, statistics
|
|
n=int(sys.argv[1]); v=[float(x) for x in sys.argv[2:]]
|
|
p,c=v[:n],v[n:]
|
|
print(f" parent n={n} min={min(p):.5f} median={statistics.median(p):.5f} mean={statistics.mean(p):.5f} stdev={statistics.stdev(p):.5f}")
|
|
print(f" commit n={n} min={min(c):.5f} median={statistics.median(c):.5f} mean={statistics.mean(c):.5f} stdev={statistics.stdev(c):.5f}")
|
|
print(f" RATIO min={min(c)/min(p):.4f} ({(min(c)/min(p)-1)*100:+.2f}%) median={statistics.median(c)/statistics.median(p):.4f} ({(statistics.median(c)/statistics.median(p)-1)*100:+.2f}%) mean={statistics.mean(c)/statistics.mean(p):.4f} ({(statistics.mean(c)/statistics.mean(p)-1)*100:+.2f}%)")
|
|
PY
|
|
echo
|
|
}
|
|
|
|
bench "self-compile: elc elc-cli.el" elc-cli.el
|
|
bench "compile test_compiler.el in --test mode" --test tests/native/test_compiler.el
|
|
|
|
echo "== machine =="; uname -a; sysctl -n machdep.cpu.brand_string 2>/dev/null; uptime
|
|
echo
|
|
echo "== NOTE: no workload in the tree at bc2f26d runs anywhere near the record's 0.36s/0.39s =="
|
|
for w in "elc-cli.el" "--test tests/native/test_compiler.el" "--test tests/native/test_lexer_scaling.el"; do
|
|
s=$(now); /tmp/elc07b $w >/dev/null 2>&1; e=$(now)
|
|
python3 -c "print(f' {$e-$s:.4f}s elc $w')"
|
|
done
|