Ever wondered which QEMU emulator is the fastest? So did I, so I made this benchmark. It runs a Sieve of Eratosthenes on each of Go's supported Linux target architectures using QEMU User Mode Emulation.
- Linux
- QEMU with User Mode Emulation (binfmt_misc) support enabled
- Go
- Python 3
- hyperfine
- matplotlib
git clone https://github.com/ostrich/QEMUUserModeBenchmark.git && cd QEMUUserModeBenchmarkmake buildmake benchmake summarymake chartOptional: make all runs the full pipeline (build, bench, summary, chart).
main.go: A Sieve of Eratosthenes. Calculates primes up to 25 million and prints the count.architectures.txt: List of Go Linux target architectures to build and benchmark.Makefile: Build/benchmark pipeline. Outputs binaries tobin/and benchmark results toresults/.summary.py: Parses JSON and prints results to stdout.--format text: Default. Prints a simple table to stdout.--format csv: Prints a CSV to stdout.--format markdown: Prints a markdown table to stdout.
chart.py: Uses matplotlib to generateresults.pngfrom the JSON output.
Run on an AMD 5900X with 64 GiB RAM.
| Architecture | Mean (s) | StdDev (s) |
|---|---|---|
| 386 | 0.079670 | 0.008981 |
| amd64 | 0.052152 | 0.006544 |
| arm | 0.371544 | 0.018007 |
| arm64 | 0.323212 | 0.024882 |
| loong64 | 0.250286 | 0.008166 |
| mips | 0.335044 | 0.018365 |
| mips64 | 0.355363 | 0.022990 |
| mips64le | 0.337094 | 0.011313 |
| mipsle | 0.330756 | 0.009971 |
| ppc64 | 0.357804 | 0.015372 |
| ppc64le | 0.354349 | 0.016179 |
| riscv64 | 0.283564 | 0.013114 |
| s390x | 0.526608 | 0.018216 |
