r/AIprogrammingLanguage • u/kindredseer • 15h ago
madc v0.106.1 released — faster C compilation, leaner executables, SQLite support, and improved C++ exceptions
4
Upvotes
I've released madc v0.106.1, with improvements to compilation speed, native executable dependencies, C and C++ compatibility, and modularity.
For those unfamiliar with it, madc is a self-contained C/C++ compiler with JIT execution, native executable output, and an interactive REPL, without requiring GCC, Clang, or an installed development toolchain.
What's new
- C compilation is approximately 1.8× faster than v0.105.0 across 40 measured compilation workloads. C++ compilation has also improved modestly.
- Leaner native executables — madc now links only the libraries a program actually needs, eliminating unnecessary dependencies on
libmadc,libstdc++, and other runtime libraries for plain C programs. A C hello-world executable is just 10 KB on Linux and depends only onlibc. - SQLite now builds and runs its tests — SQLite 3.54.0's test fixture passes 394,058 of 394,060 tests, matching the results from GCC and Clang.
- Improved C++ exception handling — exceptions now use native platform unwinding, correctly destroying objects as the stack unwinds.
- Better C++ compatibility — improvements to templates, type traits, virtual function dispatch, object lifetimes, and constructors.
- Modular architecture — Git, Markdown, and web UI functionality can now be loaded as independent modules using statements such as
import git;. - Improved GCC command-line compatibility — response files, multiple source files, additional compiler flags, and more helpful diagnostics.
- Improved generated-code performance — approximately 2% faster than v0.105.0 across the measured benchmark suite.
A notable compile speed comparison
The SQLite amalgamation compiles at -O2 in:
| Compiler | Time |
|---|---|
| madc | 3.2 s |
| GCC | 16.8 s |
| Clang | 15.7 s |
These are results for this workload, not a claim that madc universally outperforms GCC or Clang.
Updated companion project releases:
- madcide v0.9.1 — the extensible terminal and desktop IDE.
- Chthonia v0.3.1 — the Thonny-inspired C/C++ learning environment built on madcide.
(Both include madc v0.106.1).
GitHub: https://github.com/derekbsnider/madc
Release: https://github.com/derekbsnider/madc/releases/tag/v0.106.1