Skip to content

Commit

Permalink
inbounds a few tuple loops (#24335)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Oct 26, 2017
1 parent 29fcb37 commit 9ced1bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/tuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function isequal(t1::Tuple, t2::Tuple)
if length(t1) != length(t2)
return false
end
for i = 1:length(t1)
@inbounds for i = 1:length(t1)
if !isequal(t1[i], t2[i])
return false
end
Expand All @@ -269,7 +269,7 @@ function ==(t1::Tuple, t2::Tuple)
if length(t1) != length(t2)
return false
end
for i = 1:length(t1)
@inbounds for i = 1:length(t1)
if !(t1[i] == t2[i])
return false
end
Expand All @@ -285,7 +285,7 @@ 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)
for i = 1:min(n1, n2)
@inbounds for i = 1:min(n1, n2)
a, b = t1[i], t2[i]
if !isequal(a, b)
return isless(a, b)
Expand Down

0 comments on commit 9ced1bf

Please sign in to comment.