Skip to content

Commit b0884a1

Browse files
committed
Use inbounds in partial_distance2_coloring
1 parent d9ec840 commit b0884a1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/coloring.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ function partial_distance2_coloring!(
3838
for v in vertices_in_order
3939
for w in neighbors(bg, Val(side), v)
4040
for x in neighbors(bg, Val(other_side), w)
41-
if !iszero(color[x])
42-
forbidden_colors[color[x]] = v
41+
@inbounds c = color[x]
42+
if !iszero(c)
43+
@inbounds forbidden_colors[c] = v
4344
end
4445
end
4546
end
4647
for i in eachindex(forbidden_colors)
4748
if forbidden_colors[i] != v
48-
color[v] = i
49+
@inbounds color[v] = i
4950
break
5051
end
5152
end

0 commit comments

Comments
 (0)