Linear time baseconversion

Ian Kelly ian.g.kelly at gmail.com
Mon Jun 29 19:10:52 EDT 2015


On Mon, Jun 29, 2015 at 4:56 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Mon, Jun 29, 2015 at 4:39 PM,  <jonas.thornvall at gmail.com> wrote:
>> http://jt.node365.se/baseconversion8.html
>
> Back of the envelope mental calculation, that appears to be quadratic,
> not linear. Doubling the length of the input results in an approximate
> quadrupling of the time taken to produce the output.
>
> That noted, this is off-topic for this list, which is for discussion
> about Python. Please take this to somewhere else like
> comp.lang.javascript instead.

By the way, I think you have a bug. I did my time testing by
concatenating the default input number to itself several times. At
5184 decimal digits, which was the last case I tried, the 58th output
digit was 1111111, after which point the remaining 672 output digits
are all 12665464, which seemed rather improbable.



More information about the Python-list mailing list