public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: The bloat sweepstakes...
@ 2001-10-07 15:24 dewar
  0 siblings, 0 replies; 22+ messages in thread
From: dewar @ 2001-10-07 15:24 UTC (permalink / raw)
  To: guerby, zack; +Cc: gcc

<<There's room for constant tuning here, but I assume there may be a
reason why a 2MB buffer size was choosen here, anyone?
>>

Basically on the systems we are compiling GNAT on, large buffers like
this are close to free, but if there are systems where this is not true,
it should be rethought, the buffer could certainly be much smaller.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: The bloat sweepstakes...
@ 2001-10-08 10:07 dewar
  2001-10-08 11:04 ` Zack Weinberg
  0 siblings, 1 reply; 22+ messages in thread
From: dewar @ 2001-10-08 10:07 UTC (permalink / raw)
  To: dewar, zack; +Cc: gcc, guerby

by the way, in our experience with GNAT, it is the backend that is the
huge consumer of (real) memory, the front end almost always has smaller
memory requirements by a significant factor. In fact we started out with
an aggressive viewpoint of saving memory, and minimizing nodes (see the
irregulatiries of the handling of string literals for example). Only
to discover that front end memory use was pretty much irrelevant. At
the same time I agree that buffer may as well be a bit smaller, why not.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: The bloat sweepstakes...
@ 2001-10-08 10:03 dewar
  0 siblings, 0 replies; 22+ messages in thread
From: dewar @ 2001-10-08 10:03 UTC (permalink / raw)
  To: dewar, zack; +Cc: gcc, guerby

<<I don't have much sympathy with the attitude that memory, or even
address space, is free.  If nothing else, these huge buffers are
likely to be *slower* than more reasonably sized buffers because they
trash the memory caches.
>>

Ah, I think I see the point you were making. You are assuming that the
buffer will actually be used. Not at all, in practice only a very small
fraction will ever be used. It is there for unusual cases. Now your point
is that in these unusual cases, it might be better to have a circuit for
chopping things -- possibly -- but this still seems samll potatoes to me.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: The bloat sweepstakes...
@ 2001-10-08 10:01 dewar
  0 siblings, 0 replies; 22+ messages in thread
From: dewar @ 2001-10-08 10:01 UTC (permalink / raw)
  To: dewar, zack; +Cc: gcc, guerby

<<I don't have much sympathy with the attitude that memory, or even
address space, is free.  If nothing else, these huge buffers are
likely to be *slower* than more reasonably sized buffers because they
trash the memory caches.
>>

Sorry, I don't see this at all, how can a megabyte of unused virtual
memory possibly affect the memory caches.

And we are talking just about address space here.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: The bloat sweepstakes...
@ 2001-10-07 15:21 dewar
  0 siblings, 0 replies; 22+ messages in thread
From: dewar @ 2001-10-07 15:21 UTC (permalink / raw)
  To: guerby, zack; +Cc: gcc

<<Surely there's some form of dynamic allocation you could use for this,
though.  Or just not buffering the file in such huge chunks?  C stdio
tends to use buffers on the order of a memory page...
>>

Would this really gain? Are there really systems so messed up that large
unused buffers like this cost real disk space or real memory?

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: The bloat sweepstakes...
@ 2001-10-07 15:16 dewar
  2001-10-08  9:59 ` Zack Weinberg
  0 siblings, 1 reply; 22+ messages in thread
From: dewar @ 2001-10-07 15:16 UTC (permalink / raw)
  To: guerby, zack; +Cc: gcc

Probably the string buffer in lib.utils could be smaller, but really in 
these days when typical development machines have at least 256M of real
memory, this is hardly a significant issue. Indeed on most systems with
allocate on use, this is not real memory that is used at all, just
unused virtual memory space. Declaring large buffers like this should
be close to free.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* The bloat sweepstakes...
@ 2001-10-07 10:25 Zack Weinberg
  2001-10-07 10:44 ` guerby
  2001-10-09 23:24 ` Fergus Henderson
  0 siblings, 2 replies; 22+ messages in thread
From: Zack Weinberg @ 2001-10-07 10:25 UTC (permalink / raw)
  To: gcc

Largely for amusement, here's some statistics on the sizes of the
compiler binaries.  All figures are in kilobytes, for the final stage
of an i386 native bootstrap.  First, the back end:

text    rodata  data    bss     total   file
2360.3  457.2   17.2    494.5   3329.3  libbackend.a
 525.8  259.7    1.1      0.0    786.6  (insn-*.o)

The biggest (in terms of text size) object modules are all insn-*.o
files, which is why they get their own entry.  i386.o is also hefty,
at just over 100K.  The top three language-independent modules are
expr.o, fold-const.o, and dwarf2out.o, at 130K, 100K, and 94K respectively.

It is amusing to note that the huge language-independent modules are
all rather old.  The biggest recently-added module is gcse.o at 43K.

Now the front ends.  For these I subtracted the total size of
libbackend.a from all the columns.

 313.6  110.6    0.9    137.4    562.5  cc1
 391.4  130.7    1.1    138.1    661.3  cc1obj
1053.2  247.9    2.1    147.2   1450.5  cc1plus
 550.7  169.9   25.7    156.5    902.7  f771
1857.3  264.9   13.2   2321.9   4457.2  gnat1
 431.1   88.4   17.8    141.9    679.3  jc1

There's a few more static libraries in the mix, but they're all less
than 100K, and unlike libbackend it is possible that large chunks have
been left out of the final executables.

  74.3   14.8    0.3      0.7     90.1  libiberty.a
  27.5    1.4    0.1      0.0     29.0  libgcc.a
  56.4   20.6    0.0      0.0     77.1  libcpp.a	(cc1, cc1plus, cc1obj)
  28.4    5.4    4.5      0.0     38.3  libz.a		(jc1)

zw

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2001-10-22 15:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-07 15:24 The bloat sweepstakes dewar
  -- strict thread matches above, loose matches on Subject: below --
2001-10-08 10:07 dewar
2001-10-08 11:04 ` Zack Weinberg
2001-10-08 10:03 dewar
2001-10-08 10:01 dewar
2001-10-07 15:21 dewar
2001-10-07 15:16 dewar
2001-10-08  9:59 ` Zack Weinberg
2001-10-07 10:25 Zack Weinberg
2001-10-07 10:44 ` guerby
2001-10-07 11:26   ` Zack Weinberg
2001-10-07 11:44     ` guerby
2001-10-07 12:43       ` Zack Weinberg
2001-10-07 14:42         ` guerby
2001-10-09 23:24 ` Fergus Henderson
2001-10-10 15:09   ` Zack Weinberg
2001-10-10 23:03     ` Fergus Henderson
2001-10-10 23:46       ` Zack Weinberg
2001-10-19  9:43     ` law
2001-10-22  0:39       ` Zack Weinberg
2001-10-22  8:28         ` law
2001-10-22 15:01           ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).