Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #385785

Re: C23 thoughts and opinions

From Michael S <already5chosen@yahoo.com>
Newsgroups comp.lang.c
Subject Re: C23 thoughts and opinions
Date 2024-06-09 12:40 +0300
Organization A noiseless patient Spider
Message-ID <20240609124032.00004eb1@yahoo.com> (permalink)
References (14 earlier) <22r6O.5934$xPJ1.2590@fx09.iad> <v3t6nu$1liet$1@dont-email.me> <v3tlmo$1o860$7@dont-email.me> <v427sv$2no3h$1@dont-email.me> <v42cs4$2pjrh$1@dont-email.me>

Show all headers | View raw


On Sat, 8 Jun 2024 14:52:26 -0500
BGB <cr88192@gmail.com> wrote:

> On 6/8/2024 1:28 PM, Malcolm McLean wrote:
> > On 07/06/2024 01:53, Lawrence D'Oliveiro wrote:  
> >> On Thu, 6 Jun 2024 15:38:21 -0500, BGB-Alt wrote:
> >>  
> >>> *2: Seemingly the main way I am aware of to get small binaries is
> >>> to use an older version of MSVC (such as 6.0 to 9.0), as the
> >>> binary-bloat started to get much more obvious around Visual
> >>> Studio 2010, but is less of an issue with VS2005 or VS2008.  
> >>
> >> Newer version of proprietary compiler generates worse code than
> >> older version?!?  
> > If the code is calling extern gunctions that do IO, we woul expect
> > these to be massively more sophisticated on a modern ststem Witha
> > little comouter, pribtf just wtites acharacter raster and utimalthe
> > he Os picks the up and flushes it out to a pixel raster. And that'
> > aal it's doing. Whilst on a modrern syste, stdout can do whole lot
> > of intricate things. 
> 
> That is a whole lot of typos...
> 
> 
> But, even if it is built calling MSVCRT as a DLL (rather than static 
> linked), modern MSVC is still the worst of the bunch in this area.
> 
> A build as RISC-V + PIE with a static-linked C library still manages
> to be smaller than an x64 build via MSVC with entirely dynamic-linked 
> libraries.
> 
> And, around 72% bigger than the same program built as a
> dynamic-linked binary with "GCC -O3" (while also often still being
> around 40% slower).
>

GCC on Windows or on Linux?
In my experience, gcc on Windows (ucrt64 variant, other gcc variants
are worse) very consistently produces bigger (stripped) exe than even
latest MSVCs which, as you correctly stated, are not as good as older
versions at producing small code.

The size of 'Hello, world' program (x86-64, dynamically linked C RTL)
vs2013 - 6,144 bytes
vs2019 - 9,216 bytes
gcc (Debian Linux, -no-pie) - 14,400 bytes
gcc (Debian Linux) - 14,472 bytes
gcc (ucrt64 DLL) - 18,432 bytes
gcc (old DLL) - 42,496 bytes

MSVC compilation flags: -O1 -MD
gcc compilation flags: -Oz -s

> Contrast, VS2008 can build programs with binary sizes closer to those
> of GCC.
>

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-05-30 02:32 +0000
  Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-30 11:09 +0300
    Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-05-30 13:43 +0200
    Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-01 01:45 +0000
  Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-30 14:34 +0100
    Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-30 17:08 +0300
      Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-30 15:48 +0100
        Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-30 18:03 +0300
          Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-31 13:55 +0100
            Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-31 16:19 +0300
              Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-31 16:28 +0300
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-31 16:48 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-31 15:04 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-31 17:34 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-31 19:03 +0100
                Re: C23 thoughts and opinions scott@slp53.sl.home (Scott Lurndal) - 2024-05-31 18:36 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-31 22:15 +0100
                Re: C23 thoughts and opinions scott@slp53.sl.home (Scott Lurndal) - 2024-06-01 01:25 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-01 11:24 +0100
                Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-01 05:17 -0700
                Re: C23 thoughts and opinions scott@slp53.sl.home (Scott Lurndal) - 2024-06-01 15:08 +0000
                Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-01 17:22 -0700
                objcopy -I binary etc... Was: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-06 14:56 +0300
                Re: objcopy -I binary etc... Was: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-06 07:44 -0700
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-01 22:51 +0300
                Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-06-01 15:24 +0200
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-01 19:59 +0100
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-04 04:00 +0000
                Re: Correct objcopy Usage (was Re: C23 thoughts and opinions) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-04 04:33 +0000
                Re: C23 thoughts and opinions jak <nospam@please.ty> - 2024-06-01 03:37 +0200
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-01 11:09 +0100
                Re: C23 thoughts and opinions jak <nospam@please.ty> - 2024-06-01 13:59 +0200
                Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-01 17:26 -0700
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-02 01:11 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-02 00:39 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-02 03:06 +0300
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-06 14:43 +0300
                Re: C23 thoughts and opinions jak <nospam@please.ty> - 2024-05-31 21:42 +0200
                Re: C23 thoughts and opinions scott@slp53.sl.home (Scott Lurndal) - 2024-05-31 21:11 +0000
                Re: C23 thoughts and opinions BGB-Alt <bohannonindustriesllc@gmail.com> - 2024-06-06 15:38 -0500
                Re: C23 thoughts and opinions scott@slp53.sl.home (Scott Lurndal) - 2024-06-06 21:38 +0000
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-07 00:51 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-07 09:04 +0000
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-07 10:20 -0500
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-07 10:22 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-07 00:53 +0000
                Re: C23 thoughts and opinions BGB-Alt <bohannonindustriesllc@gmail.com> - 2024-06-07 16:58 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-08 03:08 +0000
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-08 00:04 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-08 08:27 +0000
                Re: C23 thoughts and opinions Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-13 14:14 +0200
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-13 14:07 -0500
                Re: C23 thoughts and opinions Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-14 08:53 +0200
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-14 03:13 -0500
                Re: C23 thoughts and opinions Bonita Montero <Bonita.Montero@gmail.com> - 2024-06-14 10:26 +0200
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-14 03:38 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-15 22:42 +0000
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-15 20:42 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-16 03:15 +0000
                Re: C23 thoughts and opinions scott@slp53.sl.home (Scott Lurndal) - 2024-06-08 13:09 +0000
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-09 00:46 +0000
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-09 11:19 +0300
                Re: C23 thoughts and opinions Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-08 19:28 +0100
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-08 14:52 -0500
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-09 12:40 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-09 11:20 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-09 14:12 +0300
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-09 14:44 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-09 17:32 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-09 20:00 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-09 21:06 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-09 23:40 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-09 22:49 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-10 01:06 +0300
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-10 01:26 +0100
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-11 08:33 +0000
                Re: C23 thoughts and opinions BGB <cr88192@gmail.com> - 2024-06-09 21:12 -0500
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-09 00:45 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-31 22:17 +0100
                Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-01 21:11 +0300
                Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-01 17:47 -0700
              Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-05-31 15:03 +0100
            Re: C23 thoughts and opinions Kaz Kylheku <643-408-1753@kylheku.com> - 2024-05-31 15:34 +0000
            Re: C23 thoughts and opinions Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-05-31 20:31 +0100
            Re: C23 thoughts and opinions Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-01 01:53 +0100
              Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-01 11:53 +0100
                Re: C23 thoughts and opinions Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-01 16:51 +0100
        Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-05-31 09:24 +0200
          Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-31 13:39 +0300
            Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-05-31 13:31 +0200
      Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-05-30 17:51 +0300
    Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-01 01:39 +0000
      Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-01 11:37 +0100
        Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-02 03:27 +0000
          Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-02 10:37 +0100
            Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-03 01:16 +0000
              Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-03 11:16 +0300
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-04 02:10 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-04 12:28 +0100
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-05 01:51 +0000
                Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-04 19:45 -0700
              Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-03 11:13 +0100
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-04 02:12 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-04 12:35 +0100
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-05 01:50 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-05 09:10 +0100
                Re: C23 thoughts and opinions Thiago Adams <thiago.adams@gmail.com> - 2024-06-05 09:23 -0300
                Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-06-05 15:09 +0200
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-06 02:12 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-06 19:38 +0100
                Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-07 00:55 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-07 22:23 +0100
                Re: C23 thoughts and opinions Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-08 00:39 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-08 02:14 +0100
                Re: C23 thoughts and opinions Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-08 03:55 +0000
                Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-08 11:14 +0100
                Re: C23 thoughts and opinions "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-07 22:36 -0700

csiph-web