DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "rolette@infiniteio.com" <rolette@infiniteio.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages
Date: Wed, 10 Dec 2014 18:39:24 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258213BED20@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB977258213BED0C@IRSMSX105.ger.corp.intel.com>


 
> From: Jay Rolette [mailto:rolette@infiniteio.com]
> Sent: Wednesday, December 10, 2014 5:58 PM
> To: Ananyev, Konstantin
> Cc: Qiu, Michael; Richardson, Bruce; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages
> 
> 
> On Wed, Dec 10, 2014 at 5:08 AM, Ananyev, Konstantin <konstantin.ananyev@intel.com> wrote:
> I wonder why we do need to write our own bubble sort procedure?
> Why we can't use standard qsort() here?
> 
> Sadly, even bubble sort would be better than the selection sort being used here. It's guaranteed to be O(n^2) in all cases.

Ah yes, your right it is a selection sort here.

> 
> I just got through replacing that entire function in my repo with a call to qsort() from the standard library last night myself. Faster
> (although probably not material to most deployments) and less code.

If you feel like it is worth it, why not to submit a patch? :)
Thanks
Konstantin

> 
> Jay

  parent reply	other threads:[~2014-12-10 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  2:25 Michael Qiu
2014-12-10 10:41 ` Bruce Richardson
2014-12-10 10:59   ` Qiu, Michael
2014-12-10 11:08     ` Ananyev, Konstantin
2014-12-10 17:58       ` Jay Rolette
     [not found]         ` <2601191342CEEE43887BDE71AB977258213BED0C@IRSMSX105.ger.corp.intel.com>
2014-12-10 18:39           ` Ananyev, Konstantin [this message]
2014-12-10 21:36             ` Jay Rolette
2014-12-11  1:44               ` Qiu, Michael

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=2601191342CEEE43887BDE71AB977258213BED20@IRSMSX105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --cc=rolette@infiniteio.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 NNTP newsgroup(s).