Re: Efficiency of using long integers to hold bitmaps

2005-07-12 Thread Jack Diederich
On Wed, Jul 13, 2005 at 03:24:48AM +1000, Jeff Melvaine wrote: > Bengt, > > Thanks for your informative reply, further comments interleaved. > > "Bengt Richter" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Mon, 11 Jul 2005 02:37:21 +1000, "Jeff Melvaine" > > <[EMAIL PROT

Re: Efficiency of using long integers to hold bitmaps

2005-07-12 Thread Bengt Richter
On Wed, 13 Jul 2005 03:24:48 +1000, "Jeff Melvaine" <[EMAIL PROTECTED]> wrote: >Bengt, > >Thanks for your informative reply, further comments interleaved. Can't reply fully now, but just had the thought that maybe some ideas from 8-queens solvers might be useful or interesting. There is an old th

Re: Efficiency of using long integers to hold bitmaps

2005-07-12 Thread Jeff Melvaine
Bengt, Thanks for your informative reply, further comments interleaved. "Bengt Richter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 11 Jul 2005 02:37:21 +1000, "Jeff Melvaine" > <[EMAIL PROTECTED]> wrote: > >>I note that I can write expressions like "1 << 100" and the

Re: Efficiency of using long integers to hold bitmaps

2005-07-12 Thread Jeff Melvaine
Raymond, Thanks for your answers, which even covered the question that I didn't ask but should have. "A Python list is not an array()\n" * 100 :) Jeff "Raymond Hettinger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [Jeff Melvaine] >> I note that I can write expressions lik

Re: Cat and Mouse (wes Re: Efficiency of using long integers to hold bitmaps)

2005-07-11 Thread Steven D'Aprano
On Mon, 11 Jul 2005 02:58:29 +, Bengt Richter wrote: > I think you are right about some game happening, but I'm not sure it's cat > and mouse. > To me, an incomplete question feels like an invitation to play "20 questions" > regarding > what the real problem is. So I get a little annoyed, an

Re: Cat and Mouse (wes Re: Efficiency of using long integers to hold bitmaps)

2005-07-10 Thread Bengt Richter
On Sun, 10 Jul 2005 19:30:58 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> Right. OTOH, I notice a frequent game of Katze und Maus (cat and mouse?) > >Yes, apparently with the same idiomatic meaning, as you d

Re: Efficiency of using long integers to hold bitmaps

2005-07-10 Thread jepler
You'll find that using Python Longs unsuitable if you *change* the bitmaps---All numeric types are immutable, so you'll copy the bitmap each time you perform an operation like "set bit". numarray has a 'bit' typecode, though I'm not sure how such an array is actually stored---from a quick look, it

Cat and Mouse (wes Re: Efficiency of using long integers to hold bitmaps)

2005-07-10 Thread Terry Reedy
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Right. OTOH, I notice a frequent game of Katze und Maus (cat and mouse?) Yes, apparently with the same idiomatic meaning, as you decribe the game here perfectly. TJR -- http://mail.python.org/mailman/listinfo

Re: Efficiency of using long integers to hold bitmaps

2005-07-10 Thread Martin v. Löwis
Bengt Richter wrote: > Sounds like a possible^H^H^H^H^H^H^H^Hprobable premature optimization worry > ;-) Right. OTOH, I notice a frequent game of Katze und Maus (cat and mouse?) in questions around Python implementation details. The OP doesn't provide details of his application, but instead asks

Re: Efficiency of using long integers to hold bitmaps

2005-07-10 Thread Bengt Richter
On Mon, 11 Jul 2005 02:37:21 +1000, "Jeff Melvaine" <[EMAIL PROTECTED]> wrote: >I note that I can write expressions like "1 << 100" and the result is stored >as a long integer, which means it is stored as an integer of arbitrary >length. I may need to use a large number of these, and am interes

Re: Efficiency of using long integers to hold bitmaps

2005-07-10 Thread Raymond Hettinger
[Jeff Melvaine] > I note that I can write expressions like "1 << 100" and the result is stored > as a long integer, which means it is stored as an integer of arbitrary > length. I may need to use a large number of these, and am interested to > know whether the storage efficiency of long integers i