Benchmarks — speed, size, network

Measured, recorded and published as they are: the raw reports are linked below each table. Speed compares the same thirteen algorithms in F# (compiled to WasmGC by fsharp-wasm) and in JavaScript; size and network are the cost of shipping the compiled modules. The same tables are on fsharp-wasm.github.io/benchmarks; this page also draws the chart and measures your own connection.

Speed

loading…

Ratio = JavaScript median ÷ F# → WasmGC median; above 1 the F# module is faster. † the compiler fuses the list pipeline into one loop (an optimisation, not the VM). ⚠ the interquartile range of one side exceeds a quarter of its median in at least one report. Node ran three times to show the spread. One machine: a 4-vCPU virtual machine. How to read the numbers, and what V8's inliner contributes: docs/benchmarks.md. Run it yourself.

F# → WasmGC fasterJavaScript faster

Size

What each compiled module weighs, as the server holds it, gzip (what GitHub Pages sends) and brotli.

Modulerawgzipbrotlibrotli / raw

What a page loads

Every same-origin request of the first load (HTML, scripts, runtime glue, module), no cache; the benchmark page also runs one kernel so that its worker loads the module. The stylesheet from a CDN (one request per page) is not counted.

Pagerequestsrawgzipbrotlilargest

Network

The time to download a module and to compile it, by network profile. Chromium emulates the network (a round trip of latency per request, the bandwidth capped; no connection setup, no TLS), the server answers with the chosen encoding; the median of the runs.

The real host

Modulerawsent as gziprequest (none / gzip / brotli asked)

Load times on your connection

Fetches every module of this site now (cache bypassed) and compiles it — the real line between you and this host, with whatever encoding it sends.

Moduleon the wiredownloadspeedcompile