[Mailman-Developers] [Bug 985149] Add List-Post value to permalink hash input

Jeff Breidenbach jeff at jab.org
Tue Apr 24 19:50:39 CEST 2012


> 0. Assume a 10 million message archive.
> 1. What percentage of permalinks need another click?
> 2. What percentage of permalinks will result in a list of more than 10 matches?

Ignoring cross posts, for a 4 character hash:

1. Approximately 90%
 2. Approximately 50%

Ignoring cross posts, for a 13 character hash:

1. Effectively 0%
2. Effectively 0%

Pick message count and collision tolerance, and hash size will follow.

-Jeff


========== simulation code

#!/usr/bin/python
import random
hashlength = 4
message_count = 10000000
database = {}
collisions = 0
for i in range(message_count):
  n = random.randint(0, pow(2, 5 * hashlength))
  if n in database:
    collisions += 1
    database[n] += 1
  else:
    database[n] = 1
over_ten_collisions = 0
for i in database:
  if database[i] > 10:
    over_ten_collisions += database[i]
p1 = (100.0 * collisions) / float(message_count)
p2 = (100.0 * over_ten_collisions) / float(message_count)
print("Percent coliisions %f" % p1)
print("Percent over ten collisions %f" % p2)


More information about the Mailman-Developers mailing list