public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de>
To: gdr@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/3552: missing hash function for std::string
Date: Wed, 08 May 2002 10:06:00 -0000	[thread overview]
Message-ID: <20020508170601.15125.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/3552; it has been noted by GNATS.

From: Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de>
To: Phil Edwards <phil@jaj.com>
Cc: Vadim Ogranovich <vograno@arbitrade.com>,
	  "'goswin.brederlow@student.uni-tuebingen.de'" <goswin.brederlow@student.uni-tuebingen.de>,
	  "'gcc-gnats@gcc.gnu.org'" <gcc-gnats@gcc.gnu.org>,
	  "'Laurent.Bonnaud@inpg.fr'" <Laurent.Bonnaud@inpg.fr>,
	  "'87063-quiet@bugs.debian.org'" <87063-quiet@bugs.debian.org>,
	  "'gcc-bugs@gcc.gnu.org'" <gcc-bugs@gcc.gnu.org>
Subject: Re: libstdc++/3552: missing hash function for std::string
Date: 08 May 2002 19:01:45 +0200

 Phil Edwards <phil@jaj.com> writes:
 
 > On Sat, Apr 27, 2002 at 02:37:52PM -0500, Vadim Ogranovich wrote:
 > > Hi, I independently came across this bug. It seems like it was classified as
 > > not a bug with no workaround posted. Is that the case? Thanks, Vadim
 
 Actually the bug was more on the line that the STL _does_ guess for
 char* but not for string and that it should use the char* hash
 function for strings too.
 
 > Yes.  How can we possibly guess what a good hash function would be for
 > arbitrary strings?  Efficiency of hashing is extremely dependant on the
 > data being hashed.  You need to write one that's appropriate for your data;
 > this will involve multiple experiments.
 > 
 > There is std::collate::hash() for char*'s, but this is essentially a
 > generic guess, and should only be used when you haven't yet had the time
 > to come up with a more appropriate function.
 
 Having one for char* but not for string is a bit of a contradiction.
 
 MfG
         Goswin


             reply	other threads:[~2002-05-08 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-08 10:06 Goswin Brederlow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-08 11:46 Phil Edwards
2002-04-29 12:56 Vadim Ogranovich
2002-04-29 12:46 Phil Edwards
2002-04-29 12:16 Phil Edwards
2002-04-27 12:46 Vadim Ogranovich
2001-07-03 16:26 Gabriel Dos Reis
2001-07-03 16:18 gdr
2001-07-03 15:26 Matthias Klose

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=20020508170601.15125.qmail@sources.redhat.com \
    --to=goswin.brederlow@student.uni-tuebingen.de \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=gdr@gcc.gnu.org \
    /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).