GitHub|Download|Report a bug Mucc Home|Documentation»Performance

Performance

Mucc is built to compile fast. The numbers on this page were measured in October 2026; make bench measures them again, on your own machine (see How the Numbers Were Measured). The mucc measured is the release binary, which mucc built, as the one you download is. (A mucc built by gcc -O2 compiles about 1.9 times as fast again, as the last table shows.)

Compiling Mucc's Own Source

How long each compiler takes to compile src/*.c to objects: 34,000 lines, 59,884 after preprocessing (the same headers are included in many files).

CompilerTimeLines per secondMucc is
Mucc0.41 s145,000
Clang 21.1 -O00.92 s64,0002.3x faster
GCC 15.2 -O01.58 s38,0003.9x faster
Clang 21.1 -O25.79 s10,00014x faster
GCC 15.2 -O28.40 s7,10020x faster

Compiling SQLite

SQLite's amalgamation, sqlite3.c 3.38.2 (239,379 lines in one file), the usual test of compile speed. TinyCC is much faster still: it writes machine code directly, in one pass, and doesn't make assembly. (It can't compile mucc's own source, which uses __int128.)

CompilerTimeLines per secondMucc is
TinyCC 0.9.270.06 s4,000,0008.3x slower
Mucc0.50 s476,000
Clang 21.1 -O00.96 s248,0001.9x faster
GCC 15.2 -O02.41 s99,0004.8x faster
Clang 21.1 -O212.98 s18,00026x faster
GCC 15.2 -O216.93 s14,00034x faster

How Fast Mucc's Code Runs

Mucc itself as the program: mucc built four ways, each compiling the same source.

Mucc built byTimeSlower than gcc -O2 by
gcc -O20.24 s
gcc -O00.36 s1.5x
mucc, with glibc (--libc=system)0.37 s1.5x
mucc, with its musl (the default)0.45 s1.9x

So the code mucc makes runs about as fast as gcc -O0's. The bundled musl's malloc and stdio make programs about 1.2 times slower than with glibc. For the fastest programs, build with gcc or clang at -O2.

How the Numbers Were Measured

On an Intel Core i7-1185G7 laptop under WSL 2, with gcc 15.2, clang 21.1 and tcc 0.9.27: real time, best of 7 with the compilers taking turns, one file at a time. Compilation time includes compilation and assembly.

Your numbers will differ. Measure them on your own machine with:

make bench                                  # mucc's own source
make bench SQLITE3_C=path/to/sqlite3.c      # and SQLite's amalgamation

Download the amalgamation from sqlite.org. test/bench.sh measures clang and tcc too if they're installed.

Why It's Fast