[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdV_Y8COyhExkf-rj1oC39iDyf3iPrN2FxH8tQnmpi6D3g@mail.gmail.com>
Date: Fri, 15 Mar 2019 18:47:44 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: George Spelvin <lkml@....org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Daniel Wagner <daniel.wagner@...mens.com>,
Dave Chinner <dchinner@...hat.com>,
Don Mullis <don.mullis@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Andrey Abramov <st5pub@...dex.ru>
Subject: Re: [PATCH 4/5] lib/list_sort: Simplify and remove MAX_LIST_LENGTH_BITS
Hi George,
On Fri, Mar 15, 2019 at 5:59 PM George Spelvin <lkml@....org> wrote:
> On Fri, 15 Mar 2019 at 13:57:05 +0100, Geert Uytterhoeven wrote:
> > On Fri, Mar 15, 2019 at 11:23 AM George Spelvin <lkml@....org> wrote:
> >> On Fri, 15 Mar 2019 at 09:20:58 +0100, Geert Uytterhoeven wrote:
> >>> On Fri, Mar 15, 2019 at 5:33 AM George Spelvin <lkml@....org> wrote:
> >>>> One question I should ask everyone: should "count" be 32 or 64 bits
> >>>> on 64-bit machines? That would let x86 save a few REX bytes. (815
> >>>> vs. 813 byte code, if anyone cares.)
> >>>>
> >>>> Allegedy ARM can save a few pJ by gating the high 32
> >>>> bits of the ALU.
> >>>>
> >>>> Most other 64-bit processors would prefer 64-bit operations as
> >>>> it saves masking operations.
> >
> > So just make it unsigned int, unconditionally.
>
> As I wrote originally (and quoted above), other 64-bit machines don't
> have 32-bit operations and prefer 64-bit operations because they don't
> require masking. x86 (for historical compatibiity) and ARM (for power
> saving) are the ones that come to mind.
>
> I'm trying to present the case to spur discussion, but it realy is
> a *question* I'm asking about whether to do that, not a suggestion
> phrased as a question.
If it's just x86_64, use size_t everywhere, and let them suffer, for not
being real 64-bit ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists