public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joe Buck <jbuck@synopsys.com>
To: drepper@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: New STL implementation from SGI
Date: Thu, 09 Jul 1998 17:02:00 -0000	[thread overview]
Message-ID: <199807100002.RAA10346@atrus.synopsys.com> (raw)
In-Reply-To: <r2emvuki93.fsf@happy.cygnus.com>

I wrote:

> > The real issue (whenever we decide to pick up the new STL) is the string
> > class: do we use the SGI one, the existing one, or the one Ulrich Drepper
> > is working on?

Ulrich replies:

> Actually Nathan is doing the work.  Anyhow, we will not completely
> abandom the version we have in the moment since on some platforms
> space consumption is more important than speed and here the current
> implementation we have is superior.

Yes, the SGI implementation is basically a slightly different
vector<charT> that is always null-terminated, meaning that there is no
reference counting and string copy is a deep copy operation, but
conversion to/from const char* is cheaper.  I would prefer something that
works more like what we have (reference counting).

However, I am discouraged by the fact that we still don't have anything
available for testing.  I'd like to encourage the developers (e.g. you and
Nathan) to make available even partially working code so that others can
assist with testing, suggestions for improvement, etc.

> To decide which version we use somebody will have to make measurements
> with a thread-safe version of either implementation.  My guess is that
> the SGI version is faster since we don't have to care for locking.

Actually I suspect that the SGI version will be slower as well as require
more memory in some applications: if copying strings from place to place
is common, but concatenation is less common, a deep copy may cost more
than a reference count adjustment.  But other operations are faster
(e.g. get the string length without any indirection, c_str() is free etc).
Because of the different implementation tradeoffs, just tell me which
implementation you want to win and I will write you an appropriate
benchmark. :-)




  reply	other threads:[~1998-07-09 17:02 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-02  7:08 Peter Simons
1998-07-06  4:08 ` Jeffrey A Law
1998-07-06  8:09   ` H.J. Lu
1998-07-06 14:48     ` Jeffrey A Law
1998-07-06 22:11       ` Ben Scherrey
1998-07-07  0:14         ` Jeffrey A Law
     [not found]         ` <6669.899795405.cygnus.egcs@hurl.cygnus.com>
1998-07-08 16:34           ` Nathan Myers
1998-07-06 18:52     ` Alex Buell
1998-07-07  5:29       ` Carlo Wood
1998-07-07 10:14         ` B. James Phillippe
1998-07-07 12:51         ` Martin von Loewis
1998-07-07 22:54           ` H.J. Lu
1998-07-08  9:58           ` Joe Buck
     [not found]           ` <199807081547.IAA06604.cygnus.egcs@atrus.synopsys.com>
1998-07-09 11:18             ` Ulrich Drepper
1998-07-09 17:02               ` Joe Buck [this message]
1998-07-09 17:40                 ` Ulrich Drepper
1998-07-10  6:04                 ` Pieter Nagel
1998-07-10 13:32                   ` Joe Buck
     [not found]                 ` <Pine.LNX.3.96.980710103559.18309h-100000.cygnus.egcs@basilisk>
1998-07-10 20:04                   ` Nathan Myers
     [not found]               ` <199807100002.RAA10346.cygnus.egcs@atrus.synopsys.com>
1998-07-10 16:49                 ` Nathan Myers
1998-07-07  1:12     ` Joe Buck
1998-07-06 18:10       ` H.J. Lu
1998-07-07  7:59         ` auto_ptr, new warning? (was: New STL implementation from SGI) Carlo Wood
1998-07-07 13:05           ` Joe Buck
     [not found] <x7sokk1h55.fsf.cygnus.egcs@peti.gmd.de>
1998-07-02 15:15 ` New STL implementation from SGI Nathan Myers
1998-07-03 12:21   ` Andi Kleen
1998-07-05 15:40     ` Martin von Loewis
     [not found] ` <k2d8bm4x5k.fsf.cygnus.egcs@zero.aec.at>
1998-07-05 19:46   ` Nathan Myers
1998-07-08  3:16     ` Gerald Pfeifer
1998-07-08 16:34       ` Branko Cibej
1998-07-07 22:54 Josh Stern
1998-07-11  6:31 Josh Stern
1998-07-13  1:48 Ross Smith
1998-07-13  8:40 ` Thomas Kunert
1998-07-13 15:28   ` Joe Buck
1998-07-13 17:29 Mike Stump
1998-07-14  8:41 ` Joe Buck
1998-07-13 17:29 Mike Stump

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=199807100002.RAA10346@atrus.synopsys.com \
    --to=jbuck@synopsys.com \
    --cc=drepper@cygnus.com \
    --cc=egcs@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).