3 ms·
Actually, the `err == nil` check doesn't exist in the latest release. It was added recently, which would explain the significant performance cost. If err is nil
by richbell 2y ago
Actually, the `err == nil` check doesn't exist in the latest release. It was added recently, which would explain the significant performance cost. If err is nil, it doesn't return early.
https://github.com/golang/go/blame/adbfb672ba485630d75f8b5598228a63f4af08a4/src/errors/wrap.go#L44 https://github.com/golang/go/blame/adbfb672ba485630d75f8b559...
- tommiegannert 2y agoNice find. This commit: https://github.com/golang/go/commit/af43932c20d5b59cdffca45406754dbccbb46dfa https://github.com/golang/go/commit/af43932c20d5b59cdffca454... from April 4.