Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> wrote:
Most of a gcc installation is hundreds of header and archive (.a) files for various libraries. There might be 32-bit and 64-bit versions. I understand that. But it also makes it hard to isolate the core compiler.gcc is just a lumbering giant, a 870MB installation, while tcc is 2.5MB.Yes, but exact size depends which version you install and how you
install it. I installed version 6.5 and removed debugging info from
executables. The result is 177MB, large but significantly smaller
than what you have.
I get a size of 3KB for tcc compiling hello.c under WSL.As for sizes:AFAICS this is one-time Windows overhead + default layout rules for
>
c:\c>dir hello.exe
24/11/2024 00:44 2,048 hello.exe
>
c:\c>dir a.exe
24/11/2024 00:44 91,635 a.exe (48K with -s)
>
(At least that's one good thing of gcc writing out that weird a.exe each
time; I can compare both exes!)
the linker. On Linux I get 15952 bytes by defauls, 14472 after
striping. However, the actual code + data size is 1904 and even
in this most is crap needed to support extra features of C library.
In other words, this is mostly irrelevant, as people who want to
get size down can link it with different options to get smaller
size down. Actual hello world code size is 99 bytes when compiled
by gcc (default options) and 64 bytes by tcc.
Up until 0.9.26 it was quite poor. That was the time I started my C compiler project (2017). At one point, I had a program (a lexing benchmark), which ran slightly faster under my dynamic language interpreter, than using tcc-compiled native code!I know none of this will cut any ice; for various reasons you don't wantWell, I tried to use tcc when it first appeared.
to use tcc.
There is question of trust: when what I reported remained unfixedIt can also do manipulations that are harder in a 'softer', safer HLL. (My scripting language however can still do most of those underhand things.)
I lost faith in quality of tcc. I still need to check if it is
fixed now, but at least now tcc seem to have some developement.
One of them being that your build process involves N slow stages soYes.
speeding up just one makes little difference.
This however is very similar to my argument about optimisation; aIf I do not have good reasons to write program in C, then likely I
running app consists of lots of parts which take up execution time, not
all of which can be speeded up by a factor of 9. The net benefit will be
a lot less, just like your reduced build time.
will write it in some higher-level language. One good reason
to use C is to code performance-critical routines.
Les messages affichés proviennent d'usenet.