34 ms·
> Base58 isn't suitable for general purpose encoding though as its performance degrades exponentially based on the length of the input. This comment only appli
by lifthrasiir 6y ago
> Base58 isn't suitable for general purpose encoding though as its performance degrades exponentially based on the length of the input.
This comment only applies to a naive scheme. There are various ways to avoid performance degradation with a minimal overhead; grouping characters so that they can represent (only slightly more than) the integral number of full bits is frequent.
- sedatk 6y agoBitcoin uses the naive scheme, why?
- lifthrasiir 6y agoProbably because: 1. There is no small power of 58 that is only slightly more than integral powers of 256. The closest one I can imagine is 57^11 ~= 1.1186 * 2^64. 2. Bitcoin addresses are short enough that trivial bignum calculation is not a bottleneck.