Tim McNamara @timclicks.dev · Nov 7

Raw pointers have a "guaranteed_eq" method that's even more guaranteed than the Eq trait.

10 likes 1 replies

?

Replies

Tim McNamara · Nov 7

Why is this useful? For most people, it's fun trivia. For programmers hunting performance, this guarantee facilitates compile-time null checks. Null checks happen billions of times in the life of a program, so saving a microsecond or so can be quite useful.