This is a small benchmark written in Python, and can measure one-core performance of compilers on big code blocks.
All languages: C, C++, ASM, Rust, Zig, LD (not language, but it can benchmark linker) Code size: 100.000 lines of code
Required packages for running full test:
- Python 3
- GCC
- G++
- Cargo
- Zig
- NASM
- GNU LD (installed by default if you have gcc/g++)
Run with default configuration:
python3 bench.py
Optional arguments:
python3 bench.py --languages=c,cpp --lines=500000
--languages argument will set which languages to test. Supported codes: c, cpp, asm, rust, zig
--lines arguments will set count of code lines to compile for every language.