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>,
	"Michael Bruck" <mbruck@rft.de>
Subject: Re: biggest deterrant to using C++?
Date: Tue, 25 Aug 1998 18:04:00 -0000	[thread overview]
Message-ID: <199808260105.VAA01740@mail1.ispnews.com> (raw)

On Tue, 25 Aug 1998 20:53:39 +0200, Michael Bruck wrote:

>You waste the space for the pointer (Thing::data). This is ok 
>if you have big classes (many values). But if you have two or
>three bytes per class this is unacceptable. It also doesn't
>make your programs easier to read (ok, with a 40KB 
>macro-header :)

Small classes with virtual methods just don't ROM effectively. Related
question: Do compilers put the vtable in the text segment so that it
can be ROM'd?

The case where I was asking the question involved a big command table
with fixed-size string buffers for each command and a series of flag
bytes. I currently build this in assembler and use a C routine to scan
the tables. Assembler is used because the tables have 26 internal
labels to allow quick jumping to command entries starting with a
specific character. (I inherited this design. In retrospect I could use
26 independent tables or use binary search, since the entries are of
fixed size.) Obviously this is the kind of bulky data that could
benefit from the architecture I described.


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

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


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 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-25 18:04 Kenneth Porter [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-08-26 10:38 Michael Bruck
1998-08-25 11:57 Michael Bruck
1998-08-24 18:39 Kenneth Porter
1998-08-23 18:37 Michael Bruck
1998-08-17 16:43 Kenneth Porter
1998-08-14 16:04 Kenneth Porter
1998-08-14 10:18 Saffi Hartal
1998-08-12 10:44 Brendan Kehoe

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=199808260105.VAA01740@mail1.ispnews.com \
    --to=shiva@well.com \
    --cc=c++-embedded@cygnus.com \
    --cc=mbruck@rft.de \
    /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).