summaryrefslogtreecommitdiff
path: root/test/files/jvm/serialization.check
diff options
context:
space:
mode:
authoraleksandar <aleksandar@lampmac14.epfl.ch>2011-12-19 15:21:59 +0100
committeraleksandar <aleksandar@lampmac14.epfl.ch>2011-12-19 16:26:13 +0100
commit832e3179cb2d0e3dbf1ff63234ec0cbc36a2b2fe (patch)
tree772423693a21a7184715456574b5366149f324f6 /test/files/jvm/serialization.check
parentd1e3b46f5bf58469bffb6f8e2ffebd932b990a5d (diff)
downloadscala-832e3179cb2d0e3dbf1ff63234ec0cbc36a2b2fe.tar.gz
scala-832e3179cb2d0e3dbf1ff63234ec0cbc36a2b2fe.tar.bz2
scala-832e3179cb2d0e3dbf1ff63234ec0cbc36a2b2fe.zip
Fix #5293 - changed the way hashcode is improved in hash sets.
The hash code is further improved by using a special value in the hash sets called a `seed`. For sequential hash tables, this value depends on the size of the hash table. It determines the number of bits the hashcode should be rotated. This ensures that hash tables with different sizes use different bits to compute the position of the element. This way traversing the elements of the source hash table will yield them in the order where they had similar hashcodes (and hence, positions) in the source table, but different ones in the destination table. Ideally, in the future we want to be able to have a family of hash functions and assign a different hash function from that family to each hash table instance. That would statistically almost completely eliminate the possibility that the hash table element traversal causes excessive collisions. I should probably @mention extempore here.
Diffstat (limited to 'test/files/jvm/serialization.check')
-rw-r--r--test/files/jvm/serialization.check8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/jvm/serialization.check b/test/files/jvm/serialization.check
index 8704bcc643..15708f0c3b 100644
--- a/test/files/jvm/serialization.check
+++ b/test/files/jvm/serialization.check
@@ -160,8 +160,8 @@ x = Map(C -> 3, B -> 2, A -> 1)
y = Map(C -> 3, A -> 1, B -> 2)
x equals y: true, y equals x: true
-x = Set(layers, title, buffers)
-y = Set(layers, title, buffers)
+x = Set(buffers, title, layers)
+y = Set(buffers, title, layers)
x equals y: true, y equals x: true
x = History()
@@ -279,8 +279,8 @@ x = ParHashMap(1 -> 2, 2 -> 4)
y = ParHashMap(1 -> 2, 2 -> 4)
x equals y: true, y equals x: true
-x = ParHashSet(2, 1, 3)
-y = ParHashSet(2, 1, 3)
+x = ParHashSet(1, 2, 3)
+y = ParHashSet(1, 2, 3)
x equals y: true, y equals x: true
x = ParRange(0, 1, 2, 3, 4)