tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] TCC, king of small exe... hey wait...


From: Yann Collet
Subject: [Tinycc-devel] TCC, king of small exe... hey wait...
Date: Fri, 20 Sep 2013 18:49:05 +0200

Hi


I'm currently using TCC in my regular list of compilers. I like it much, due to its simplicity, and checking code portability with it is a breeze, since it is fast.

Initially, my intention was to use TCC in order to produce small exe. After all, this is one of the advertised properties of TCC. (see http://en.wikipedia.org/wiki/Tiny_C_Compiler#Compiled_program_performance)

At the beginning it seemed to work fine. Small programs were indeed way smaller.

However, as soon as I started to complexify the source code, it became less a real property. With reasonably complex source files, TCC generates larger binaries than GCC or VS.

My current guess is that TCC is lacking many optimizations techniques, which is also the primary reason for its speed. Among the list of lacking optimization may figure :
- no dead code elimination
- no unused function code elimination

The second one might be the most harmful : in one instance, I compiled a library from which I was using a single function, although it defined a dozen ones. The resulting binary became fairly large.

So now for the questions :
- Is the analysis proposed above correct ? Or need to be elaborated ?
- Is it even an objective for TCC to generate small-size exe ?


Best Regards

reply via email to

[Prev in Thread] Current Thread [Next in Thread]