The race one app, three ways, side by side
Each panel runs the same app: written by hand in JavaScript, written in Lean and compiled to
WebAssembly (wasm64, LeanUI's production build), and the same Lean program run by
lean-vir , Lean's interpreter compiled to
WebAssembly. This page clicks each app's own buttons, times every click, and checks that all three
end up showing the same thing.
How it is measured. Script time is the time the clicks take: the app's own work (for
LeanUI, the Lean update, view and diff) and its DOM calls. Style, layout and paint come later, once
per frame, for the same DOM in all three, and are not counted. In Life the panels share the
time: in each animation frame, the ones that have used the least time so far click until they have
used 8 ms more, so all three get the same time and the faster ones get further. Table runs
the standard operations one panel at a time, each after its usual warm-up clicks; the median of the
runs counts. After a run, this page checks what each app shows: in Life the generation, the
live cells and the board (it hashes the cells on the page the way the apps hash theirs), in
Table the rows after every operation. “Started in” is the time from loading the panel to the
app being ready (the panels load one after another), with the size of what it downloaded,
compressed where the server compresses (as the site does). Each run loads the pages afresh. These
times come from your browser on your machine; docs/BENCHMARKS.md in the repository has the
automated benchmarks and how they differ (fresh page loads, traced rendering).