This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 695
Benchmark #72
Comments
Thanks for benchmarking this, if you want to bundle this up into a PR I'd be glad to add it. The thesis I'm operating under is the error path is the unexpected path and the costs of generating a stack trace is reasonable given the other costs associated with a cleanup and recovery in the error path. |
That's the same rational I'm using it with. That being said, it costs more than a cgo call by a considerable margin, so while normally it shouldn't be noticed, it shouldn't ever by in a hot loop that keeps returning errors... unless you want to slow that hot error producing loop down. I'll send a PR in a bit. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Dave,
I like the API. I'm using this in govendor now.
When working on another project lower level lib, I thought I'd like to look at the performance impact. I'm not too concerned, but I wanted some numbers to put behind me before I used it. I didn't find a benchmark in this repo so I wrote one:
It looks like the cost per op is roughly 1000-3000 ns. Which isn't a concern for me. But I'm glad to know it isn't more expensive.
The text was updated successfully, but these errors were encountered: