On 25/09/12 23:12, Asher Feldman wrote:
Base36 certainly isn't the most efficient way to
store a sha1, but it's
what is in use all over mediawiki. I think there was some discussion on
this list of the tradeoffs of different methods when revision.rev_sha1 was
added, and base36 was picked as a compromise. I don't know why base36 was
picked over base62 once it was decided to stick with an ascii alpha-numeric
encoding but regardless, there was opposition to binary. Taken on its
own, an integer index would be more efficient but I don't think it makes
sense if we continue using base36.
We started using base36 for storing deleted files. The advantage of
base36 is that it's shorter than plain hex, but it can be stored
-without collisions- in a case insensitive filesystem.