Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zachmu
8 months ago
|
parent
|
context
|
favorite
| on:
Go: Sentinel errors and errors.Is() slow your code...
That's interesting, because I ran the benchmarks on that version of Go.
richbell
8 months ago
[–]
The `err == nil` check was added in April to avoid expensive and unnecessary reflection. Perhaps 1.23, or whichever release that ends up in, would be faster?
https://github.com/golang/go/commit/af43932c20d5b59cdffca454...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: