From: Arjan van de Ven <arjanv@redhat.com>
To: Momchil Velikov <velco@fadata.bg>
Cc: linux-kernel@vger.kernel.org
Subject: Re: slab: avoid linear search in kmalloc? (GCC Guru wanted :)
Date: Wed, 21 Nov 2001 09:22:36 +0000 [thread overview]
Message-ID: <3BFB725C.7468088A@redhat.com> (raw)
In-Reply-To: <20011121024525.A18750@lina.inka.de> <873d38wkmo.fsf@fadata.bg>
Momchil Velikov wrote:
>
> >>>>> "Bernd" == Bernd Eckenfels <ecki@lina.inka.de> writes:
>
> Bernd> Hello,
> Bernd> I noticed that kmalloc and kmem_find_general_cachep are doing a linear
> Bernd> search in the cache_sizes array. Isnt it better to speed that up by doing a
> Bernd> binary search or a b-tree if like the following patch?
>
> Here is a patch using a gcc extension. gcc generates binary search for the case.
the big "case" statement makes you wonder if ffz(~size) would do the
same ;)
next prev parent reply other threads:[~2001-11-21 9:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-21 1:45 slab: avoid linear search in kmalloc? (GCC Guru wanted :) Bernd Eckenfels
2001-11-21 2:03 ` Andrew Morton
2001-11-21 9:14 ` Momchil Velikov
2001-11-21 9:22 ` Arjan van de Ven [this message]
2001-11-21 9:34 ` Momchil Velikov
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=3BFB725C.7468088A@redhat.com \
--to=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=velco@fadata.bg \
/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.