public inbox for c++-embedded@sourceware.org
 help / color / mirror / Atom feed
From: "Kenneth Porter" <shiva@well.com>
To: "c++-embedded@cygnus.com" <c++-embedded@cygnus.com>
Subject: template bloat
Date: Tue, 25 Aug 1998 17:50:00 -0000	[thread overview]
Message-ID: <199808260051.UAA01586@mail1.ispnews.com> (raw)

Many of us, I'm sure, avoid templates because they often generate
identical code differentiated only by parameter types, but not by the
final binary. This usually happens where the template parameter is a
pointer and the template doesn't dereference the pointer. For example,
an STL container of pointers will suffer from this effect.

It would be nice if the tool chain could identify these situations and
merge templates that are binary-equivalent. One way to do this is to
assign a checksum to every routine in the compiler and have the linker
look for routines with the same checksum. These can then be further
examined to see if the code is identical and can then be merged.

For debugging, the feature could be disabled for all routines that
don't share common source (ie. non-templates).

Ken
mailto:shiva@well.com
http://www.well.com/user/shiva/

http://www.e-scrub.com/cgi-bin/wpoison/wpoison.cgi (Death to Spam!)


             reply	other threads:[~1998-08-25 17:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-25 17:50 Kenneth Porter [this message]
1998-08-26 15:51 Kenneth Porter
1998-08-27  4:05 Michael Bruck
1998-08-27  5:12 Jackie Chen
1998-08-27  6:23 ` Pete Becker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199808260051.UAA01586@mail1.ispnews.com \
    --to=shiva@well.com \
    --cc=c++-embedded@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).