All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Gaetan Rivet <gaetan.rivet@6wind.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [PATCH] bus: skip useless iterations in rte_bus_find
Date: Wed, 25 Oct 2017 13:13:35 +0200	[thread overview]
Message-ID: <9158332.2t1W8VLTKN@xps> (raw)
In-Reply-To: <ec2729e5-7f24-3407-2b7a-c2c8714789ab@intel.com>

24/10/2017 02:18, Ferruh Yigit:
> On 8/29/2017 9:19 AM, Gaetan Rivet wrote:
> > The starting point is known. The iterator can be directly set to it.
> > 
> > The function rte_bus_find can easily be used with a comparison function
> > always returning True. This would make it a regular bus iterator.
> > 
> > Users doing so would however accomplish such iteration in
> > 
> >    O(N * N/2) = O(N^2)
> > 
> > Which can be avoided.
> > 
> > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> > ---
> > 
> > In practice, such cost is entirely negligible of course.
> > It is cleaner and more correct though.
> 
> +1 for more clean approach
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

      reply	other threads:[~2017-10-25 11:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 16:19 [PATCH] bus: skip useless iterations in rte_bus_find Gaetan Rivet
2017-10-24  0:18 ` Ferruh Yigit
2017-10-25 11:13   ` Thomas Monjalon [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=9158332.2t1W8VLTKN@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.