Compile time
minc compared with clang and MSVC building the box3d sample browser: a 3D physics engine, a sokol renderer, a Dear ImGui interface, and ~150 interactive sample scenes.
The C compilers build the upstream C/C++ tree: 112 translation units through CMake and Ninja, about 294,000 lines. minc builds the box3d-minc, generated from the same source by a C-minc-transpiler written in minc. All builds emit similar 128-bit SIMD code. minc code is 235,988 lines. Same machine as the runtime performance page.
Full build
Wall-clock seconds from clean to a runnable binary. Lower is better. (CMake configure time is not included, minc has no configure step.)
| optimized | optimization off | |||
|---|---|---|---|---|
| compiler | 24 threads | 1 thread | 24 threads | 1 thread |
| minc | 2.8 s | 2.8 s | 1.8 s | 1.8 s |
| clang | 14.7 s | 52.4 s | 4.6 s | 24.4 s |
| MSVC | 9.3 s | 36.6 s | 3.5 s | 19.9 s |
minc is single-threaded and compiles the whole application in one process, so its 24-thread and 1-thread columns are the same measurement. Optimized, the C builds get Ninja's full parallelism and still finish 3.3× (MSVC) and 5.3× (clang) behind; compiler against compiler on one thread, the gap is 13× and 19×.
Incremental rebuild
The C builds recompile only what depends on the change, then relink. minc has no incremental mode: every build is the full 236,000 lines.
| change | minc | clang | MSVC |
|---|---|---|---|
| one engine .c file | 2.8 | 0.9 | 0.8 |
| one sample .cpp file | 2.8 | 0.9 | 0.8 |
| a public engine header | 2.8 | 4.7 | 4.5 |
C toolchains win during incremental builds: one translation unit plus a relink is under a second, against minc's flat 2.8 s full rebuild. Change a common header and minc wins: the C builds recompile nearly ninety translation units and now take longer than minc takes to rebuild the whole application.
What each build compiles
| C/C++ | minc | |
|---|---|---|
| compilation units | 112 | 1 |
| source lines | ~294,000 | 235,988 |
| build system | CMake + Ninja | none |
| linker | MSVC link | none (direct PE) |
| binary size | 3.36–3.54 MB | 3.57 MB |
The C line count covers the engine (src/), the samples
application, and the vendored dependencies it compiles: Dear ImGui,
ImPlot, nativefiledialog and the sokol headers. System and Windows SDK
headers are not counted, though the C compilers parse them in every
translation unit. The minc line count is the compiler's own count of
the single unit it compiled, which includes the box3d port, the sokol
and ImGui bindings, and the application. All three binaries are
statically linked.
Most of the line-count difference is shaders: upstream commits 54,000 lines of per-backend generated shader headers, while the minc browser writes each shader once as a minc function and the compiler cross-compiles it for the active backend during the build.
Test setup
| Machine | AMD Ryzen 9 5900X, 12 cores / 24 threads, 32 GB, Windows 11, stock power plan, idle |
| minc | 0.9.14, default flags (optimized build, bounds checking on) |
| MSVC | 19.44.35227 (Visual Studio 2022, 17.14.32), CMake Release config |
| clang-cl | 19.1.5, target x86_64-pc-windows-msvc (bundled with Visual Studio 2022), CMake Release config |
| Build system | CMake 4.1.2 + Ninja 1.13.2 for the C builds; minc invoked directly |
| box3d | upstream 2386141. minc builds the published box3d-minc module; the C compilers build the upstream sources directly |
| Date | 2026-09-01 |
Notes
- Method. The three toolchains run interleaved on an idle machine. Full builds are timed over six to eight rounds, single-threaded ones over three, incremental rebuilds over five; the tables show the median round. A clean build deletes all objects and the binary but keeps the CMake configuration; timing starts at the Ninja or minc invocation and ends when the executable is on disk.
- CMake configure time is not counted. Configuring the upstream tree takes about 7 seconds warm, plus dependency downloads on the first run. minc has no configure step.
- Optimization. The C builds use
upstream's CMake Release configuration (
/O2); the optimization-off columns rebuild identical trees with/Od(NDEBUGand the release runtime stay on). minc's default build is its optimized build, with bounds checking on; it has no unoptimized mode, so its off columns use-Og(debug friendly codegen). - Shaders. The upstream build compiles no shaders: it builds from precompiled shader headers committed to the repository. minc compiles the renderer's shaders from source inside the measured build.
- The two applications differ. The upstream browser has two extra samples (determinism, replay), ImPlot graphs and a native file dialog; the minc browser has a debug adapter instead. The line counts above are the scale of each build.
- ImPlot is the C build's slowest unit.
The C version draws its frame-time chart with ImPlot; the minc browser uses
plain ImGui plot widgets. One of the
three ImPlot translation units,
implot_items.cpp, is the critical path of the parallel C builds above. Re-measured with ImPlot's objects compiled before the timer starts and everything else clean, the C builds take 5.7 s (MSVC) and 7.4 s (clang) on 24 threads, and 29.8 s / 39.6 s single-threaded. Against minc's unchanged 2.8 s that is 2.1× / 2.7× parallel and 10.7× / 14.2× single-threaded. - Why is minc fast? All headers parsed once, no separate assembler or linker, one process with the whole program in memory. The compiler was designed to be fast: it rebuilds itself in ~1.3s (147k lines). Single-threaded, it moves about 85,000 lines a second (on box3d) through the full optimizing pipeline; on the same lines-counted basis the C compilers manage 8,000 (MSVC) and 5,600 (clang) on this codebase.
- This is one application on one machine. A template-heavy C++ codebase would widen the gap; a plain C library spread over many small files would narrow it.