Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> wrote:Oh, I thought you were reporting sizes of 99 and 64 bytes, in response to tcc's 2048 bytes.On 24/11/2024 05:03, Waldek Hebisch wrote:That more or less agrees with file size that I reported. IBart <bc@freeuk.com> wrote:>>As for sizes:>
>
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!)
AFAICS this is one-time Windows overhead + default layout rules for
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.
I get a size of 3KB for tcc compiling hello.c under WSL.
prefer to look at what 'size' reports and at looking at .o
files,
I'm sure that with Python, say, pretty much anything can be done given enough effort. Even if it means cheating by using external add-on modules to get around language limitations, like using Ctypes module, which you will likely find uses C code.It can also do manipulations that are harder in a 'softer', safer HLL.Anything computational can be done in a HLL. You may wish to
(My scripting language however can still do most of those underhand things.)
play tricks to save time. Or possible some packing tricks to
save memory. But packing tricks can be done in HLL (say by
treating whole memory as a big array of u64), so this really
boils down to speed.
Les messages affichés proviennent d'usenet.