Skip to content

Commit c864635

Browse files
simeonschaubjohanmon
authored andcommitted
remove === for singleton equality tip (JuliaLang#40517)
With JuliaLang#38905 merged, this shouldn't apply in general anymore. I am sure with `==` being a generic function, there will still be cases where using `===` will lead to more precise inference, but I don't think this is worth specifically mentioning in the performance tips.
1 parent 53cb7a2 commit c864635

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

doc/src/manual/performance-tips.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,11 +1600,3 @@ will not require this degree of programmer annotation to attain performance.
16001600
In the mean time, some user-contributed packages like
16011601
[FastClosures](https://github.com/c42f/FastClosures.jl) automate the
16021602
insertion of `let` statements as in `abmult3`.
1603-
1604-
## Checking for equality with a singleton
1605-
1606-
When checking if a value is equal to some singleton it can be
1607-
better for performance to check for identicality (`===`) instead of
1608-
equality (`==`). The same advice applies to using `!==` over `!=`.
1609-
These type of checks frequently occur e.g. when implementing the iteration
1610-
protocol and checking if `nothing` is returned from [`iterate`](@ref).

0 commit comments

Comments
 (0)