lkml.org 
[lkml]   [2008]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] cpus4096 fixes


On Sun, 27 Jul 2008, Al Viro wrote:
>
> ITYM "one 32.5kB array" -
> (u64[65][64]){[1][0] = 1, [2][0] = 2, [3][0] = 4, ..., [64][0] = 1ULL<<63}
> would work just fine. You were saying...?

Yeah, you can optimize it even more, I agree. But even the _trivial_ one
gets you to linear memory use (rather than something that is O(n^2) in
number of CPU's) and makes the thing a non-issue. But yes, there's another
almost-factor-of-two that you can get by being clever.

But in fact, I think your optimization would not just use less memory, but
yes, it's also easier to write the initializer for (with just a couple of
levels of macros to avoid having to do 64 entries by hand).

So yes, make it so. Please.

Linus




\
 
 \ /
  Last update: 2008-07-28 00:23    [W:0.132 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site