Numerics written in C++ and compiled to WebAssembly. Everything below runs in your browser — the covariance solve, the orbit integration, the benchmark — nothing is precomputed or server-rendered.
Efficient frontier
solving…
Hover or focus a point on the curve to see its weights.
Sample mean/covariance from a modeled 10-year monthly return series for 12 asset classes (not live market data — see the note in the dataset). Solved as a sweep over risk-aversion λ: minimize (λ/2)wᵀΣw − μᵀw subject to 1ᵀw = 1.
N-body integrator
t0.00
steps0
ΔE / E₀0.00e+0
integratorleapfrog
Softened gravity, 4 mutually-interacting bodies. Leapfrog (kick-drift-kick) is symplectic and time-reversible, which is why its energy error stays bounded and oscillatory instead of drifting away — switch to explicit Euler to see the difference.
WASM vs JS benchmark
Run it to see real numbers from this machine, this browser, right now.
Both sides run the identical algorithm on identical inputs — the same efficient-frontier solve (100 points). A single solve is faster than most browsers' clock resolution can measure, so each number is a batch of calls timed together and divided back down (15 such batches, median shown). This workload is branchy and cache-resident rather than memory-bandwidth-bound, which is where WASM tends to pull ahead of JIT'd JS — a plain dot product, by contrast, usually lands close to parity.