r/javascript • • 15m ago

TabBench: benchmarking Linux-in-browser implementations - Unkernel vs. WebVM vs. BrowserPod

https://github.com/leaningtech/tabbench

TabBench is a reproducible benchmark suite for libraries that run Linux programs in a browser tab. It runs the same commands natively and in each runtime on the same machine, and reports each result as a ratio to native. Only the commands are timed, after everything has booted.

It currently support three runtimes:

- [unkernel](https://github.com/pithings/unkernel): the Linux kernel compiled to WebAssembly, running arm64 binaries on an emulated CPU

- [CheerpX](https://cheerpx.io): an x86-to-WebAssembly JIT, the engine behind WebVM

- [BrowserPod](https://browserpod.io): programs compiled to WebAssembly ahead of time, with JavaScript on the browser's own engine

The workloads are shell tools (sort, gzip, sha256sum, find and a shell loop) and Node tools (npm ci, ESLint, the acorn parser and a CPU benchmark from unkernel's tests).Results, as a ratio to native (lower is faster):

- Shell tools: BrowserPod 1.4–5.8×, CheerpX 3.6–8.9×, unkernel 4.1–22×

- JavaScript: BrowserPod 1.4–5.1×, CheerpX 32–58×, unkernel 33–49×

- npm ci: BrowserPod 9.6×, unkernel 31×

We plan to add other runtimes, such as v86, JSLinux, container2wasm and WebContainers.

Disclosure: I am the lead engineer and CTO of Leaning Technologies, we make BrowserPod and CheerpX. The test suite is public and can be replicated, and PRs from maintainers of other runtimes are welcome.

Full description and results: https://github.com/leaningtech/tabbench

1 Upvotes

0 comments sorted by