Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
L-four
on June 1, 2024
|
parent
|
context
|
favorite
| on:
Go: Sentinel errors and errors.Is() slow your code...
It shouldn't surprise anyone that a checking a bool is faster than calling a function and checking the bool it returns.
jay-barronville
on June 1, 2024
[–]
The function call itself isn’t really the culprit (the cost of the function call itself is negligible in this case). It’s the implementation of the function [0].
[0]:
https://news.ycombinator.com/item?id=40542102
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: