TinyCC: the ten times claim is against gcc with optimisations off, and this is an unofficial mirror
Unofficial mirror of mob development branch
At a glance
- What is it?
- The small C compiler whose readme is a plain text file with ASCII underlines, whose full documentation is a manual you have to compile, whose performance claim is measured against a compiler invoked with optimisations disabled, and whose build switches off a hardening flag on one compiler version, in a repository whose own description says it is an unofficial mirror of somebody else's branch.
- Who is it for?
- TinyCC suits anyone who needs to compile and run C somewhere it was not meant to go, on a rescue disk, in a script, on a machine with no linker, because that constraint is the design and everything else follows from it. Verify four things first.
- Can I use it commercially?
- Yes, with conditions. LGPL-2.1 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- TinyCC/tinycc3,104 ★ · +66
| Repository | 2026-09-24 | 2026-11-15 |
|---|---|---|
| TinyCC/tinycc | 3k | 3.1k |
66 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The repository describes itself as an unofficial mirror of a branch
The one-line summary attached to this repository is not a description of the compiler. It says the repository is an unofficial mirror of a development branch, and the default branch is named to match. The address given as the project's home is a plain-http web interface to a git repository hosted on a different service entirely. So everything a reader takes from this copy is a copy: the branch name, the fact that it tracks a development line rather than a release, and the absence of any release tags at all. The readme itself is signed with a single person's name and no date, and it says the licence is the Lesser General Public License with a pointer to the licence file at the root. There is also a file at the root whose name is about relicensing, which tells you the licence question is live in this project rather than settled history.
The ten times claim is measured against a compiler with optimisations off
The feature list is four bulleted items, each an adjective in capitals followed by an explanation, and the second contains the number everyone quotes. The first of the four gives the reason the project exists: compiling and running C everywhere, on rescue disks. The compiler is said to compile and link about ten times faster than a well-known compiler invoked with optimisation level zero. That qualifier is the whole claim. A comparison against unoptimised output measures the cost of optimisation, not the cost of the compiler, and the readme gives no machine, no version of either compiler, no input, and no methodology of any kind. The third bullet then hedges the language standard, saying the compiler is heading toward full compliance with the 1999 revision rather than claiming it, and it names that revision in a form that does not match the standard's usual spelling. Two claims in four bullets, and both have a caveat attached in the same sentence.
The readme is plain text and the full manual has to be compiled before you can read it
The file at the root is called README, not README.md, and its section headings are underlined with rows of dashes rather than marked up in any way. The documentation section explains where the real documentation lives: a manual in a markup format that needs a separate documentation compiler installed before it can be built, and two plain text files, one holding the full feature list and one for the Windows port. So the standard library's documentation generator is an optional dependency of the project's own documentation, and the readme's instruction to read the manual for all the features means two build steps before you start. The rest of the root is in the same register: a changelog, a todo list, a list of who uses it, a coding style note, a version file, and a relicensing note, none of them in markdown.
The build switches off a hardening flag on one compiler version
The build file contains a conditional that is worth reading closely.
ifeq (-$(GCC_MAJOR)-$(findstring $(GCC_MINOR),56789)-,-4--)
CFLAGS += -D_FORTIFY_SOURCE=0
endifThe condition matches a compiler whose major version is four and whose minor version contains one of a list of digits, and when it matches, a compile flag that enables a hardening feature is explicitly switched off. The flag is one that asks the standard library to substitute checked string and memory functions at compile time, so on those compiler versions the library is built without it. Nothing in the readme mentions this, and no reason is given in the build file either, so a reader has to notice it to know it is there. For a project whose fourth advertised feature is an optional memory and bound checker that you can mix freely with unchecked code, it is an odd thing to find hard-coded against the compiler rather than offered as an option, and it applies only to the versions the condition names.
The bundled headers are faster to compile and the readme says standard ones are slower
The compiler ships its own minimal standard library include, and the readme recommends it when you want a small one, naming floppy disks as the case it was written for. It then says you can of course use the standard headers, and that they are slower to compile. That is a design choice stated as a trade rather than hidden: the fast path gives you less of the library, and the correct path costs you the speed this project is known for. The examples make the same point from the other side. The simplest one runs as a script directly. One using standard headers is described as hello world with the ordinary system library. The one that opens a window is called a very complicated test in fact because standard headers are being used. So the examples that demonstrate the compiler's headline characteristic are the ones that avoid its main cost, which is exactly the trade-off you inherit when you adopt it.
Five targets are advertised and the source tree shows one that is not
The readme names five instruction sets the compiler generates machine code for. The tree is more informative, because the code generator is split per architecture and the file names make the split visible: there is a quartet for each of four architectures, made of an assembler emitter, a general emitter, a linker emitter, and a token header. Then there are two files for a fifth target, one emitter and one linker, with no assembler emitter and no token header. That target is a 68000-derived architecture, and it appears nowhere in the feature list. So the source layout describes the porting surface more accurately than the readme does, which is useful if you are trying to add a target and slightly misleading if you are trying to know what ships. The names also make clear that the token table is per architecture, which is where most porting work would go. The file names also make clear that the token table is per architecture, which is where most of the porting work would go.
The test suite is a self-compilation check plus a hand-written bug probe
Testing a compiler has two obvious strategies and this project uses both. The compiler's own source is compiled by itself, and the readme says that file exists to check the code generator, which is a self-hosting check that catches miscompilations of the compiler itself. Alongside it there is a hand-written file described as an automated test that exercises many subtle possible bugs, and that file is what the test target runs. The examples directory has five numbered programs, of which the readme describes two as benchmarks rather than demonstrations, so a third of the sample code exists to be timed rather than read. The build also has to work around its own library choice: when the compiler is built as a shared library rather than a static one, the test target needs the library directory on the search path, and there is a comment explaining that one platform does not read that variable out of the box so a relative path is baked into the binary instead.
Editorial conclusion
TinyCC suits anyone who needs to compile and run C somewhere it was not meant to go, on a rescue disk, in a script, on a machine with no linker, because that constraint is the design and everything else follows from it. Verify four things first. This repository is an unofficial mirror of a development branch hosted elsewhere, so find the canonical copy before you file anything or depend on a commit. The headline speed claim is against a compiler invoked with optimisations disabled and comes with no methodology, machine or version. Standard library headers are explicitly slower to compile than the bundled minimal set, which means the examples and your own code will not see the same speed. And the build turns off a hardening macro on one compiler version, which is worth knowing if you are shipping binaries built with it.
Frequently asked questions
What is TinyCC?
A small ANSI C compiler that compiles and executes C source directly, with no linking or assembly step and a full preprocessor included. It can use any C dynamic library directly, can compile itself, ships an optional memory and bound checker that mixes freely with unchecked code, and runs a C file as a script when its first line names the interpreter.
how to install tinycc
Four commands: run the configure script, then make, then the test target, then the install target. The default install location is the usual local binary directory and the configure script prints its options. The readme notes that one BSD family needs a different make, and that Windows users should read a separate text file.
How does TinyCC compare with gcc?
The readme claims it compiles and links about ten times faster than that compiler invoked with optimisation level zero. It gives no machine, no version of either compiler, no input and no method, so the figure measures the cost of optimisation rather than the cost of the compiler.
Does TinyCC fully support the 1999 revision of the C standard?
Not according to its own readme, which says the compiler is heading toward full compliance rather than claiming it, and names the revision in a form that does not match the standard's usual spelling. The bundled minimal headers are offered as the faster path, with the standard headers described as slower to compile.
Which processor architectures does TinyCC target?
Five are named in the readme. The source tree describes the porting surface more precisely: four of them have a four-file group consisting of an assembler emitter, a general emitter, a linker emitter and a token header, while a fifth has only the two emitter files and appears nowhere in the readme's list.
How do I run a C program as a script with TinyCC?
Put an interpreter line naming the compiler with its run flag as the first line of the source and set the execute bit on the file, after which the operating system launches it the way it would launch a shell script. Command line arguments arrive in the usual two parameters of the main function. Several of the bundled examples are written to be launched this way.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/tinycc-tinycc)Star history chart for your README
[](https://hysenlabs.com/projects/tinycc-tinycc)Was this useful?