[Python-Dev] to_int -- oops, one step missing for use.

Scott David Daniels Scott.Daniels at Acm.Org
Sat Nov 12 22:49:03 CET 2005


OK, Tim and I corresponded off-list (after that Aahz graciously
suggested direct mail).  The code I have is still stand-alone,
but I get good speeds: 60% - 70% of the speed of int(string, base).

It will take a little bit to figure out how it best belongs in
the Python sources, so don't look for anything for a couple of weeks.
Also, I'd appreciate someone testing the code on a 64-bit machine.
Essentially all I'll need is that person to do a build and
then run the tests.  Unfortunately the posted module tests only
cover the 32-bit long cases, so what I need is another test tried
on a 64-bit long machine (that uses 64-bit longs in Python).
So, if you have a Python installation where
     sys.maxint == (1 << 63) - 1
is True, and you'd like to help, here's what I need.

If you already have the zip, retrieve:
      http://members.dsl-only.net/~daniels/dist/test_hi_powers.py

If you don't already have the zip, retrieve:
      http://members.dsl-only.net/~daniels/dist/to_int-0.10.zip
      (I just added the test_hi_powers.py to the tests in the zip)

Unpack the zip, do the build:
     $ python setup_x.py build

copy the built module into the test directory, cd to that dir, and
run test_hi_powers.py.  Let me know if the tests pass or fail.

Thanks.

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-Dev mailing list