Messages in this thread | | | Date | Sun, 27 Jul 2008 15:17:14 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [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
| |