Trouble with psyco
Dick Moores
rdm at rcblue.com
Wed Nov 24 07:23:35 EST 2004
Thanks for the insightful and instructive responses.
>>> import sys
>>> sys.maxint
2147483647
Because my sys.maxint (2**31-1) is the limit of Python's integers, I ran
a bunch of tests using both 2**31-1 (2147483647) and 2**31 (2147483648),
with psyco and without, with longs and not. And then a set at 4000000000.
Here's what I got:
+psyco -longs 2147483647 4
+psyco -longs 2147483648 361
+psyco +longs 2147483647 368
+psyco +longs 2147483648 367
-psyco -longs 2147483647 444
-psyco -longs 2147483648 790
-psyco +longs 2147483647 908
-psyco +longs 2147483648 934
+psyco -longs 4000000000 725
-psyco -longs 4000000000 1577
+psyco +longs 4000000000 731
-psyco +longs 4000000000 1669
The last numbers are seconds.
+longs means that the script was modified so that k starts as 0L, and max
is a long.
Dick Moores
Dick Moores wrote at 02:07 11/22/2004:
>psyco is acting a bit psycho for me.
>
>Please see my spinForWeb.py at <http://www.rcblue.com/Python/spinForWeb.py>
>
>When psyco is in use, entering an integer somewhere between 2000 and
>2500 causes my computer to freeze. Not really freeze but the program
>doesn't finish, and I have to quit with a ^Q.
>
>psyco is really impressive, but I'm disappointed that I can't
>demonstrate (to friends) counting with it to numbers above 2 billion.
>
>If I remark out the "psyco.bind(spin)" line, there's no problem no
>matter what integer I enter. Can someone explain what the problem with
>psyco is?
>
>Windows XP, Python 2.3.4
>
>Thanks,
>
>Dick Moores
>rdm at rcblue.com
More information about the Python-list
mailing list