public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@codesourcery.com>
To: Geoffrey Keating <geoffk@apple.com>
Cc: Giovanni Bajo <giovannibajo@libero.it>,  gcc@gcc.gnu.org
Subject: Re: attribute data structure rewrite
Date: Fri, 24 Sep 2004 12:24:00 -0000	[thread overview]
Message-ID: <4153DD7C.2040205@codesourcery.com> (raw)
In-Reply-To: <6832D6AE-0DF5-11D9-B012-000A95B1F520@apple.com>

Geoffrey Keating wrote:
> 
> On 23/09/2004, at 7:30 PM, Giovanni Bajo wrote:

>> Why not simply VEC(one_attribute) ?
> 
> 
> VECs are much too much for what's needed here.  They're expandable, they 
> can be used as a stack, all kinds of stuff (and all kinds of data) that 
> aren't necessary.
The extra data they have over your implementation is an 'allocated' field.
And the alloc and num fields are ints, rather than shorts.

It would not be difficult to have additional defining macros which specified
'this never grows to more that 16,000 entries'.  If that was done,
it would become the exact same size as your data structure, and you'd
get the same API as other vectors, rather than a new bespoke API for your
need.

I'd much prefer the same API for all vector-like things.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


  reply	other threads:[~2004-09-24  8:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-24  0:15 Geoffrey Keating
2004-09-24  0:34 ` Andrew Pinski
2004-09-24  1:30   ` Joseph S. Myers
2004-09-24  1:47   ` Zack Weinberg
2004-09-24  6:52   ` Geoffrey Keating
2004-09-24  1:40 ` Gabriel Dos Reis
2004-09-24  2:34   ` Giovanni Bajo
2004-09-24  2:59     ` Gabriel Dos Reis
2004-09-24  4:17       ` Giovanni Bajo
2004-09-24  4:18         ` Gabriel Dos Reis
2004-09-24  8:40     ` Andreas Schwab
2004-09-24  8:40       ` Andreas Schwab
2004-09-24  9:17     ` Joseph S. Myers
2004-09-24 14:45       ` Giovanni Bajo
2004-09-24  8:36   ` Geoffrey Keating
2004-09-24 14:03     ` Joseph S. Myers
2004-09-24  2:35 ` Giovanni Bajo
2004-09-24  8:33   ` Geoffrey Keating
2004-09-24 12:24     ` Nathan Sidwell [this message]
2004-09-24 22:29 ` Mark Mitchell

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=4153DD7C.2040205@codesourcery.com \
    --to=nathan@codesourcery.com \
    --cc=gcc@gcc.gnu.org \
    --cc=geoffk@apple.com \
    --cc=giovannibajo@libero.it \
    /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).