Date: Thu, 31 May 2012 14:51:22 +0000 From: gpf@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r236815 - soc2012/gpf/misc Message-ID: <20120531145122.221D51065780@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120531145122.221D51065780>