From owner-svn-soc-all@FreeBSD.ORG Thu May 31 14:51:24 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 221D51065780 for ; Thu, 31 May 2012 14:51:22 +0000 (UTC) (envelope-from gpf@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Thu, 31 May 2012 14:51:22 +0000 Date: Thu, 31 May 2012 14:51:22 +0000 From: gpf@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120531145122.221D51065780@hub.freebsd.org> Cc: Subject: socsvn commit: r236815 - soc2012/gpf/misc X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 14:51:24 -0000 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