socsvn commit: r236815 - soc2012/gpf/misc
gpf at FreeBSD.org
gpf at FreeBSD.org
Thu May 31 14:51:24 UTC 2012
Author: gpf
Date: Thu May 31 14:51:21 2012
New Revision: 236815
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=236815
Log:
slight modification of comment header
Modified:
soc2012/gpf/misc/ck.py
Modified: soc2012/gpf/misc/ck.py
==============================================================================
--- soc2012/gpf/misc/ck.py Thu May 31 14:47:59 2012 (r236814)
+++ soc2012/gpf/misc/ck.py Thu May 31 14:51:21 2012 (r236815)
@@ -1,13 +1,17 @@
#!/usr/bin/env python
-# gpf: testing how often cuckoo_insert goes into infinite loop
+# gpf: testing how often cuckoo_insert goes into infinite loop and the releationship between
+# success_rate and hash table size.
# comments:
# This implementation uses 2 hash tables and 2 respective hash functions.
-# The size of a hash table is the next mprime number of the total amount of elements
+# The size of a hash table is the next mprime number of the total amount of elements.
# So for 100 elements we will have 2 * 101 = 202 cells.
# observations:
# This way, success rate is around ~85%.
# If we increate the size of the tables by 10%, success rate goes to ~96%
# In this case, success rates increase as the number of total elements n increase.
+# TODO:
+# Next step is to test with actual real life data (pefs namemacs) and maybe some
+# modification of the vanilla cuckoo algorithm
import random
import gmpy
More information about the svn-soc-all
mailing list