public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tim Lange <mail@tim-lange.me>
To: Jason Merrill <jason@redhat.com>
Cc: GCC Mailing List <gcc@gcc.gnu.org>
Subject: Re: Usage of the C++ stdlib unordered_map in GCC
Date: Wed, 31 Aug 2022 17:22:26 +0200	[thread overview]
Message-ID: <E1KHHR.VC0DG8OMG3UO2@tim-lange.me> (raw)
In-Reply-To: <CADzB+2=6OAoqjacH+VWPo--W=UYvrB-c5385=A_d0f1x5mkm=Q@mail.gmail.com>

On Mi, Aug 31 2022 at 10:35:08 -0400, Jason Merrill via Gcc 
<gcc@gcc.gnu.org> wrote:
> Generally we want to use the GCC hash_map because it works with GCC 
> garbage
> collection (and PCH).  Is that not relevant to your patch?
> 
> Jason

The map is only part a short-lived visitor object inside the analyzer 
and is used to map svalues to other svalues (in most cases <15 kv 
pairs). I'm new to GCC, so I started of using what I knew. Only later, 
I have noticed that the unordered_map is used little to nowhere. It is 
not much effort to change it but I just wondered whether the usage is 
so low because GCC only lately switched to C++11 or other reasons. The 
responses answered my question, thanks.

- Tim



      parent reply	other threads:[~2022-08-31 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 19:57 Tim Lange
2022-08-30 20:07 ` Marek Polacek
2022-08-31  9:37   ` Jonathan Wakely
2022-08-31 14:35     ` Jason Merrill
2022-08-31 14:35       ` Jason Merrill
2022-08-31 15:22       ` Tim Lange [this message]

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=E1KHHR.VC0DG8OMG3UO2@tim-lange.me \
    --to=mail@tim-lange.me \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.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).