The size of the module version hash is currently 7 characters, by base36-encoding the result of `fnv132` (as done in ResourceLoader::makeHash).
Contrary to what I thought, this algo usually only needs 6 characters, not 7. As such, for more than half of the modules in production (enwiki/anon/defaults), the base conversion is padding a zero.
```lang=js
let startsWithZero = 0;
let startsWithNonZero = 0;
mw.loader.getModuleNames().forEach(name => {
mw.loader.getVersion(name)[0] === '0' ? (startsWithZero++) : (startsWithNonZero++);
});
({ startsWithZero, startsWithNonZero })
//> { startsWithZero: 637, startsWithNonZero: 595 }
```
About 52% of module hashes have a zero padded. And 3% even has two zeroes padded.
```lang=js
let startsWithTwoZero = 0;
mw.loader.getModuleNames().forEach(name => {
mw.loader.getVersion(name)[1] === '0' && (startsWithTwoZero++);
});
startsWithTwoZero
///> 34
```
|{F29898894}
| Figure 1. Zeroes galore
|--
To do:
* {icon square-o} Document what our needs are of the hashing algo.
* {icon square-o} Reduce the size from 7 to 6.
* {icon square-o} Consider reducing it further.