<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-5%3Ahpan027</id>
	<title>SE250:lab-5:hpan027 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-5%3Ahpan027"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:hpan027&amp;action=history"/>
	<updated>2026-04-28T09:23:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:lab-5:hpan027&amp;diff=6538&amp;oldid=prev</id>
		<title>Mark: 8 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-5:hpan027&amp;diff=6538&amp;oldid=prev"/>
		<updated>2008-11-03T05:19:47Z</updated>

		<summary type="html">&lt;p&gt;8 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Initial problems ==&lt;br /&gt;
&lt;br /&gt;
A lot of time was spent at the start of the lab to try to understand the code and the statistical results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Determining the sample size ==&lt;br /&gt;
&lt;br /&gt;
To determine the sample size, I carried out a series of ent_test with different sample sizes.&lt;br /&gt;
&lt;br /&gt;
 Buzhash low 5		3.00000	50.00%	132.875	100.00%	-0.509682&lt;br /&gt;
 Buzhash low 10		3.58496	50.00%	107.667	36.34%	0.235256&lt;br /&gt;
 Buzhash low 100		6.15366	2.50%	130.460	3.45%	-0.088601&lt;br /&gt;
 Buzhash low 1000	7.84646	97.50%	126.550	2.01%	0.006193&lt;br /&gt;
 Buzhash low 10000	7.97970	25.00%	127.177	1.95%	-0.007153&lt;br /&gt;
 Buzhash low 100000	7.99827	50.00%	127.587	0.14%	0.000712&lt;br /&gt;
 Buzhash low 1000000	7.99989	99.99%	127.501	0.23%	-0.000832&lt;br /&gt;
&lt;br /&gt;
Basically, the conclusion was somewhere around 10000 the results stop varying much, and hence 10,000 was the chosen sample size for the rest of the tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Results for part one ==&lt;br /&gt;
&lt;br /&gt;
 rand low		7.71844	0.01%	110.541	8.92%	-0.048389&lt;br /&gt;
 high rand low		7.79205	25.00%	134.546	4.12%	-0.028254&lt;br /&gt;
 buzhash low		7.84379	95.00%	128.086	0.29%	-0.017268&lt;br /&gt;
 buzhashn low		7.82387	90.00%	127.373	1.06%	-0.007118&lt;br /&gt;
 hash_CRC low		4.04588	0.01%	94.848	27.32%	-0.395249&lt;br /&gt;
 base256 low		0.00000	0.01%	97.000	27.32%	undefined&lt;br /&gt;
 Java_Integer low	2.79173	0.01%	31.125	27.32%	-0.230200&lt;br /&gt;
 Java_Object low		2.00000	0.01%	77.000	27.32%	-0.521556&lt;br /&gt;
 Java_String low		7.91760	99.99%	126.441	1.25%	0.003240&lt;br /&gt;
 &lt;br /&gt;
 rand high		7.76960	5.00%	112.412	11.98%	-0.044490&lt;br /&gt;
 high rand high		7.82756	90.00%	128.999	1.82%	-0.025330&lt;br /&gt;
 buzhash high		7.79778	50.00%	126.574	4.31%	-0.007005&lt;br /&gt;
 buzhashn high		7.82387	90.00%	127.373	1.06%	-0.007118&lt;br /&gt;
 hash_CRC high		7.20246	0.01%	114.932	2.01%	-0.032076&lt;br /&gt;
 base256 high		3.91922	0.01%	106.410	27.32%	0.217294&lt;br /&gt;
 Java_Integer high	2.79173	0.01%	31.125	27.32%	-0.230200&lt;br /&gt;
 Java_Object high	3.77034	0.01%	41.971	27.32%	-0.099688&lt;br /&gt;
 Java_String high	7.37782	0.01%	117.390	8.92%	-0.013887&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusions for part one ==&lt;br /&gt;
&lt;br /&gt;
It was very difficult to determine the order of &amp;quot;randomness&amp;quot; of each function because it&amp;#039;s hard to weigh each statistical test. In the end, the order was decided by how many categories each functions &amp;quot;won&amp;quot; in and how many they &amp;quot;lost&amp;quot; in.&lt;br /&gt;
&lt;br /&gt;
 1) buzhashn&lt;br /&gt;
 2) buzhash&lt;br /&gt;
 3) high rand&lt;br /&gt;
 4) Java_String&lt;br /&gt;
 5) rand&lt;br /&gt;
 6) hash_CRC&lt;br /&gt;
 7) base256&lt;br /&gt;
 8) Java_Object&lt;br /&gt;
 9) Java_Integer&lt;br /&gt;
&lt;br /&gt;
*It was surprising in terms of &amp;quot;score&amp;quot; using a low entropy source and high entropy source actually didn&amp;#039;t make much difference to the performance of the hash functions. Although the above rank was decided using an overall score from both low and high entropy source, the standings would not have changed much if we were to rank the functions separately.&lt;br /&gt;
&lt;br /&gt;
*It is likely the ranks for randomness would change depending on sample size. This was clearly seen earlier when buzhash was ran multiple times. It is likely certain functions perform better within a certain range of numbers and hence are disadvantaged by this particular sample size.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusions for part two ==&lt;br /&gt;
*Buzhash is pretty much consistent with the expected result&lt;br /&gt;
*Java_String seems to perform better than expected&lt;br /&gt;
*Java_Object seems to be broken for with a low entropy source&lt;br /&gt;
*hash_CRC tends to have a higher llps than the expected&lt;br /&gt;
&lt;br /&gt;
== Data for part two ==&lt;br /&gt;
&lt;br /&gt;
 Buzhash low 1000/10000: llps = 4, expecting 2.82556&lt;br /&gt;
 hash_CRC low 1000/10000: llps = 2, expecting 2.82556&lt;br /&gt;
 Java_Object_hash low 1000/10000: llps = 1000, expecting 2.82556&lt;br /&gt;
 Java_String_hash low 1000/10000: llps = 1, expecting 2.82556&lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 1000000/100000: llps = 26, expecting 26.6057&lt;br /&gt;
 hash_CRC low 1000000/100000: llps = 25, expecting 26.6057&lt;br /&gt;
 Java_Object_hash low 1000000/100000: llps = 1000000, expecting 26.6057&lt;br /&gt;
 Java_String_hash low 1000000/100000: llps = 18, expecting 26.6057&lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 10000/10000: llps = 7, expecting 6.67222&lt;br /&gt;
 hash_CRC low 10000/10000: llps = 12, expecting 6.67222&lt;br /&gt;
 Java_Object_hash low 10000/10000: llps = 10000, expecting 6.67222&lt;br /&gt;
 Java_String_hash low 10000/10000: llps = 5, expecting 6.67222&lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 20000/10000: llps = 10, expecting 9.37449&lt;br /&gt;
 hash_CRC low 20000/10000: llps = 22, expecting 9.37449&lt;br /&gt;
 Java_Object_hash low 20000/10000: llps = 20000, expecting 9.37449&lt;br /&gt;
 Java_String_hash low 20000/10000: llps = 6, expecting 9.37449&lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 40000/10000: llps = 15, expecting 13.7119&lt;br /&gt;
 hash_CRC low 40000/10000: llps = 29, expecting 13.7119&lt;br /&gt;
 Java_Object_hash low 40000/10000: llps = 40000, expecting 13.7119&lt;br /&gt;
 Java_String_hash low 40000/10000: llps = 7, expecting 13.7119&lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 50000/10000: llps = 16, expecting 15.6448&lt;br /&gt;
 hash_CRC low 50000/10000: llps = 49, expecting 15.6448&lt;br /&gt;
 Java_Object_hash low 50000/10000: llps = 50000, expecting 15.6448&lt;br /&gt;
 Java_String_hash low 50000/10000: llps = 10, expecting 15.6448&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Buzhash low 100000/10000: llps = 22, expecting 24.2788&lt;br /&gt;
 hash_CRC low 100000/10000: llps = 69, expecting 24.2788&lt;br /&gt;
 Java_Object_hash low 100000/10000: llps = 100000, expecting 24.2788&lt;br /&gt;
 Java_String_hash low 100000/10000: llps = 16, expecting 24.2788&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Buzhash high 10000/100000: llps = 3, expecting 3.3271&lt;br /&gt;
 hash_CRC high 10000/100000: llps = 3, expecting 3.3271&lt;br /&gt;
 Java_Object_hash high 10000/100000: llps = 2, expecting 3.3271&lt;br /&gt;
 Java_String_hash high 10000/100000: llps = 4, expecting 3.3271&lt;br /&gt;
 &lt;br /&gt;
 Buzhash high 100000/100000: llps = 7, expecting 7.75952&lt;br /&gt;
 hash_CRC high 100000/100000: llps = 9, expecting 7.75952&lt;br /&gt;
 Java_Object_hash high 100000/100000: llps = 16, expecting 7.75952&lt;br /&gt;
 Java_String_hash high 100000/100000: llps = 8, expecting 7.75952&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Buzhash high 20000/10000: llps = 9, expecting 9.37449&lt;br /&gt;
 hash_CRC high 20000/10000: llps = 11, expecting 9.37449&lt;br /&gt;
 Java_Object_hash high 20000/10000: llps = 25, expecting 9.37449&lt;br /&gt;
 Java_String_hash high 20000/10000: llps = 10, expecting 9.37449&lt;br /&gt;
 &lt;br /&gt;
 Buzhash high 30000/10000: llps = 11, expecting 11.6473&lt;br /&gt;
 hash_CRC high 30000/10000: llps = 12, expecting 11.6473&lt;br /&gt;
 Java_Object_hash high 30000/10000: llps = 36, expecting 11.6473&lt;br /&gt;
 Java_String_hash high 30000/10000: llps = 11, expecting 11.6473&lt;br /&gt;
 &lt;br /&gt;
 Buzhash high 40000/10000: llps = 14, expecting 13.7119&lt;br /&gt;
 hash_CRC high 40000/10000: llps = 15, expecting 13.7119&lt;br /&gt;
 Java_Object_hash high 40000/10000: llps = 49, expecting 13.7119&lt;br /&gt;
 Java_String_hash high 40000/10000: llps = 13, expecting 13.7119&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>