Skip to content

Commit

Permalink
Merge pull request #11236 from mlubin/tuples
Browse files Browse the repository at this point in the history
fix logic for hashing long tuples
  • Loading branch information
simonster committed May 15, 2015
2 parents 0ef256c + 7c37d7a commit c260ea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/tuple.jl
Expand Up @@ -88,7 +88,7 @@ const tuplehash_seed = UInt === UInt64 ? 0x77cfa1eef01bca90 : 0xf01bca90
hash( ::Tuple{}, h::UInt) = h + tuplehash_seed
hash(x::Tuple{Any,}, h::UInt) = hash(x[1], hash((), h))
hash(x::Tuple{Any,Any}, h::UInt) = hash(x[1], hash(x[2], hash((), h)))
hash(x::Tuple, h::UInt) = hash(x[1], hash(x[2], hash(tail(x), h)))
hash(x::Tuple, h::UInt) = hash(x[1], hash(x[2], hash(tail(tail(x)), h)))

function isless(t1::Tuple, t2::Tuple)
n1, n2 = length(t1), length(t2)
Expand Down

0 comments on commit c260ea9

Please sign in to comment.