public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Paul Jackson <pj@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: remove bitmap_shift_*() bitmap length limits
Date: Sat, 3 Apr 2004 23:04:49 -0800	[thread overview]
Message-ID: <20040404070449.GZ791@holomorphy.com> (raw)
In-Reply-To: <20040403225712.7d4acc86.pj@sgi.com>

On Sat, Apr 03, 2004 at 10:57:12PM -0800, Paul Jackson wrote:
> There was one bug in my untested code for simple bitmap shifts,
> the left shift needs to scan downwards, not upwards, so as to
> avoid clobbering the input if shifting inplace.
> The total text size of my user level test program is actually
> made smaller with this per-bit simple implementation, as compared
> to the implementation currently in the kernel, by 80 bytes.
> Bill Irwin's more sophisticated version grows the text size,
> over the current implementation, by 304 bytes.  This is on
> Pentium pc, gcc version 3.3.2, compiled -O2.
> Given the very rare usage this bitmap shift routines receive,
> I cast my vote for small and simple.
> The more sophisticated logic of Bill's implementation is
> impressive, but unjustified in this situation, in my view.
> My fixed shift functions are:

I don't see this as a hard problem or why you call the implementation I
brewed up impressive. I don't personally have a preference as to what
implementation is used so long as it's not got fixed-size arrays in it,
though I am somewhat puzzled as to why you bothered.


-- wli

  reply	other threads:[~2004-04-04  7:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-30  6:51 remove bitmap_shift_*() bitmap length limits William Lee Irwin III
2004-03-30  7:36 ` William Lee Irwin III
2004-03-30  8:11   ` William Lee Irwin III
2004-04-01 21:30     ` Paul Jackson
2004-04-01 22:42       ` Paul Jackson
2004-04-04  6:57         ` Paul Jackson
2004-04-04  7:04           ` William Lee Irwin III [this message]
2004-04-04  7:17             ` Paul Jackson
2004-04-04  7:11         ` Paul Jackson

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=20040404070449.GZ791@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.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