Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Blaikie <dblaikie@gmail.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Simon Marchi <simon.marchi@ericsson.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Use std::forward_list for displaced_step_inferior_states
Date: Wed, 21 Nov 2018 17:27:00 -0000	[thread overview]
Message-ID: <CAENS6EtxT_kXOc319-nmR46h-WM69M2h=u0NfabS9FkAtGpQPg@mail.gmail.com> (raw)
In-Reply-To: <dac253be972488dc45c3a9e2d18e5fbf@polymtl.ca>

On Mon, Nov 19, 2018 at 8:03 PM Simon Marchi <simon.marchi@polymtl.ca> wrote:
>
> On 2018-11-19 18:21, David Blaikie wrote:
> > Why forward list of pointers rather than forward list of values?
> > Forward list of pointers would make two allocations per node, rather
> > than one, I think?
>
> You are right, there's no good reason (except that maybe it was a
> smaller step).
>
> > Ah, I'd replied on the other thread about this with a patch, but my
> > email got bounced due to rich text (Google Inbox).
> >
> > I've attached my patch for this - though it uses list instead of
> > forward_list - good catch on that!
>
> Actually, I would use an std::vector.  There's a single object per
> inferior, so that list is likely to be very small.  A vector should be
> faster for pretty much every situation.  From what I can see, it doesn't
> matter if objects are moved (we don't save a pointer to them anywhere).
> Does that sound good to you (I can take care of writing the patch)?

Yeah, for sure! Thanks!

- Dave

>
> Simon


      reply	other threads:[~2018-11-21 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181112185945.24599-1-simon.marchi@ericsson.com>
2018-11-18 18:56 ` Kevin Buettner
2018-11-19 16:58   ` Simon Marchi
2018-11-19 23:21 ` David Blaikie
2018-11-20  4:03   ` Simon Marchi
2018-11-21 17:27     ` David Blaikie [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='CAENS6EtxT_kXOc319-nmR46h-WM69M2h=u0NfabS9FkAtGpQPg@mail.gmail.com' \
    --to=dblaikie@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    --cc=simon.marchi@polymtl.ca \
    /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