All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH,RFC] faster kmalloc lookup
Date: Sun, 27 Oct 2002 14:29:19 +0100	[thread overview]
Message-ID: <3DBBEA2F.6000404@colorfullife.com> (raw)
In-Reply-To: 3DBBBB30.20409@colorfullife.com

I've run my slab microbenchmark over the 3 versions:
- current
- generic_fls
- i386 asm optimized fls

The test reports the fastest time for 100 kmalloc calls in a tight loop 
(Duron 700). Loop/test overhead substracted.

32-byte alloc:
current:        41 ticks
generic_fls: 56 ticks
bsrl:            54 ticks

4096 byte alloc: 84 ticks
generic_fls: 53 ticks
bsrl:        54 ticks

40 ticks difference for -current between 4096 and 32 bytes - ~4 cycles 
for each loop.
bit scan is 10 ticks slower for 32 byte allocs, 30 ticks faster for 4096 
byte allocs.

No difference between generic_fls and bsrl - the branch predictor can 
easily predict all branches in generic_fls for constant kmalloc calls.

--
    Manfred


  reply	other threads:[~2002-10-27 13:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-26 19:22 [PATCH,RFC] faster kmalloc lookup Manfred Spraul
2002-10-26 22:30 ` Alan Cox
2002-10-27 10:08   ` Manfred Spraul
2002-10-27 13:29     ` Manfred Spraul [this message]
2002-10-28 13:05       ` Nikita Danilov
2002-10-28 13:18         ` Marcus Alanen
2002-10-28 13:26           ` Nikita Danilov
2002-10-28 16:03             ` Manfred Spraul
2002-10-31  9:35 ` Arjan van de Ven
2002-10-31 23:03   ` Manfred Spraul
     [not found] <3DBAEB64.1090109@colorfullife.com.suse.lists.linux.kernel>
     [not found] ` <1036056917.2872.0.camel@dhcp59-228.rdu.redhat.com.suse.lists.linux.kernel>
     [not found]   ` <3DC1B6D0.8050202@colorfullife.com.suse.lists.linux.kernel>
2002-11-01  8:03     ` Andi Kleen

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=3DBBEA2F.6000404@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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.