On 29.06.2013 16:19, Nathan Hurst wrote:
On Wed, Jun 26, 2013 at 09:06:01AM +0200, Carl Friedrich Bolz wrote:
On 30.05.2013 18:41, Nathan Hurst wrote:
It doesn't have to be quadratic, it's easy to come up with a splitting
algorithm:

FWIW, I started turning this code into RPython code on the
faster-str-of-bigint branch.

Do you have a github gist or similar?

I already merged it to the main branch:

https://bitbucket.org/pypy/pypy/commits/902241cca7dc4cb76bf65732c3d134543fb433a0

Thanks very much :-).

The main changes I did from your version was generalize it to work for
any 3 <= n <= 36, optimize the handling of leading zeros and use a
StringBuilder instead of a list to build the resulting string. Plus I
kept the already existing fast version for powers of two alive.

Cheers,

Carl Friedrich
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to