Deleted Comment
Deleted Comment
Deleted Comment
Deleted Comment
if err == nil || target == nil {
return err == target
}
So the overhead is the function call and 2 comparisons. I wonder if the `isComparable := reflectlite.TypeOf(target).Comparable()` line was moved into a separate function if the compiler would inline Is() reducing the perf impact.Possibly related: https://github.com/golang/go/issues/61502
Looks like they're working on improving the inliner.
Deleted Comment