Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #140544
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Compiler stress test |
| Date | 2019-02-05 22:56 +1300 |
| Message-ID | <gbt4u3Ffhg9U5@mid.individual.net> (permalink) |
| References | <q3bl3g$gs4$1@dont-email.me> <gbt4iiFfhg9U4@mid.individual.net> |
On 05/02/2019 22:50, Ian Collins wrote:
> On 05/02/2019 22:30, jacobnavia wrote:
>> Prompted by Bart's discussion, I wrote a small C program that generates
>> C source files.
>> The file is just N functions like:
>>
>> int fn1(void)
>> {
>> int a=1,b=2,c=3,d=4;
>> return a=b+c*d;
>>
>> }
>> int fn2(void)
>> {
>> int a=1,b=2,c=3,d=4;
>> return a=b+c*d;
>>
>> }
>>
>>
>> Etc.
>>
>> You can pass it as a parameter the number of functions you want to
>> generate.
>>
>> I passed it 1 000 000 and it generated a file of 68 888 896 bytes with 1
>> million small functions.
>>
>> Tests done with an i7 CPU, windows 7 machine with 32GB RAM.
>>
>> LCC (64 bits) took 5 hours 47 minutes and 50 seconds. The 64 bit object
>> file was 98 000 358 bytes.
>>
>> TCC took 10 seconds, no object file produced, no diagnostics. It just quits.
>>
>> Microsoft was the winner with just 52 minutes and 13 seconds for its 32
>> bit version. The 64 bit version was slower with 1 hour, 27 minutes and
>> 15 seconds. The 64 bit object file was 234 778 394 bytes.
>>
>> gcc runs out of memory in 11 seconds (1 second more than tcc). When the
>> out of memory condition appears, the machine has still 18 GB of memory free.
>
> Is gcc a 32 bit executable on your machine?
>
> On mine it's happily to chug away with 13.6G of RAM...
>
> $ wc -l zz.c
> 5000000 zz.c
>
> $ time gcc zz.c
> /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In
> function `_start':
> (.text+0x20): undefined reference to `main'
> collect2: error: ld returned 1 exit status
>
> real 5m46.880s
> user 5m38.221s
> sys 0m8.236s
>
> I forgot -c...
> $ gcc --version
> gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
>
With -c:
$ time gcc -c zz.c
real 5m41.981s
user 5m34.321s
$ ls -lh zz.o
-rw-r--r-- 1 ian ian 137M Feb 5 22:54 zz.o
--
Ian.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Compiler stress test jacobnavia <jacob@jacob.remcomp.fr> - 2019-02-05 10:30 +0100
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-05 22:50 +1300
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-05 22:56 +1300
strict aliasing rule on buffers slacked.misha@gmail.com - 2019-02-05 13:33 +0100
Re: strict aliasing rule on buffers Richard Damon <Richard@Damon-Family.org> - 2019-02-05 08:13 -0500
Re: strict aliasing rule on buffers Barry Schwarz <schwarzb@dqel.com> - 2019-02-05 06:00 -0800
Re: strict aliasing rule on buffers David Brown <david.brown@hesbynett.no> - 2019-02-05 15:33 +0100
Re: strict aliasing rule on buffers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-02-05 14:36 +0000
Re: strict aliasing rule on buffers James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-02-05 07:27 -0800
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-07 08:28 +1300
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-06 19:48 +0000
Re: Compiler stress test jacobnavia <jacob@jacob.remcomp.fr> - 2019-02-06 22:11 +0100
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-07 00:34 +0100
Re: Compiler stress test jacobnavia <jacob@jacob.remcomp.fr> - 2019-02-07 07:13 +0100
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-07 08:32 +0100
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-07 12:06 +0000
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-07 14:08 +0100
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-07 13:49 +0000
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-07 17:01 +0100
Re: Compiler stress test jacobnavia <jacob@jacob.remcomp.fr> - 2019-02-07 22:26 +0100
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-07 23:24 +0100
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-07 23:20 +0000
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-08 10:42 +0100
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-08 16:37 +1300
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-08 12:30 +0100
Re: Compiler stress test Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2019-02-08 08:18 -0800
Re: Compiler stress test scott@slp53.sl.home (Scott Lurndal) - 2019-02-08 16:04 +0000
Re: Compiler stress test Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-02-11 20:34 +0000
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-08 16:30 +1300
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-05 12:20 +0000
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-06 09:59 +1300
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-05 21:57 +0000
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-06 00:29 +0100
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-05 23:58 +0000
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-06 14:10 +1300
Re: Compiler stress test Bart <bc@freeuk.com> - 2019-02-06 01:16 +0000
Re: Compiler stress test Ian Collins <ian-news@hotmail.com> - 2019-02-06 14:21 +1300
Re: Compiler stress test Paul <nospam@needed.invalid> - 2019-02-06 01:28 -0500
Re: Compiler stress test Paul <nospam@needed.invalid> - 2019-02-08 03:51 -0500
Re: Compiler stress test David Brown <david.brown@hesbynett.no> - 2019-02-06 08:13 +0100
Re: Compiler stress test BGB <cr88192@hotmail.com> - 2019-02-06 13:13 -0600
csiph-web