How can I encode an integer with base 36 in Python and then decode it again?
I benchmarked the example encoders provided in answers to this question. On my Ubuntu 18.10 laptop, Python 3.7, Jupyter, the %%timeit magic command, and the integer 4242424242424242 as the input, I got these results:
base36encode(): 3.62 µs ± 44.2 ns per loopint2base: 10 µs ± 400 ns per loop (after fixing py37 compatibility)int_to_base36(): 3.83 µs ± 28.8 ns per loop All timings were mean ± std. dev. of 7 runs, 100000 loops each.