Powersets of a list?

David C. Ullrich ullrich at math.okstate.edu
Mon May 28 16:31:30 CEST 2001


On Sun, 27 May 2001 15:01:45 -0700, Corran Webster
<cwebster at nevada.edu> wrote:

>In article <3b1148b5.183134130 at news.okstate.edu>, David C.
>Url^H^Hllrich <ullrich at math.okstate.edu> wrote:
>
>[snip]
>
>> [timings of various power sets snipped]
>> 
>> Thanks (I _hate_ to install new software, even
>> new versions of Python - now I can put off 2.x
>> a little longer...)
>> 
>> Two questions: Why did you omit the bitshifting ones
>> from the range(18) test,
>
>Impatience, basically.  For MacPython, the numbers are:
>
>range(18):
>    bitshifting1 233.366666667
>    bitshifting2 263.916666667
>
>and were significantly higher when run from within the IDE.  I killed
>the program when I was first testing it after about 3 minutes, since I
>expected it to take at most a minute.
>
>The values for Unix Python on OS X were much more reasonable:
>
>range(18):
>    bitshifting1 39.32
>    bitshifting2 70.92
>
>I'm not sure why it took so long in MacPython.  I wonder if there's
>something weird with bitwise operations in MacPython?

Do you Mac guys have native 32-bit integers? Surely yes, but
if someone was using 16-bit integers and emulating 32-bit
integers in software when needed then the bitshifting things
would suddenly slow down when n > 16 or 15 or so.

>> and who's this David Urlich
>> guy? His code looks vaguely familiar but I can't place
>> the name.
>
>Urg.  My abject apologies!

I don't know what you're apologizing for. Now this Urlich
guy, _he_ has some explaining to do...

>Corran



David C. Ullrich
*********************
"Sometimes you can have access violations all the 
time and the program still works." (Michael Caracena, 
comp.lang.pascal.delphi.misc 5/1/01)



More information about the Python-list mailing list