News for hackers. Stuff that matters.
Re:Exceptions should be Exceptional (2016) by mratsim on Friday March 13, 2020 @07:45AM (#22566487)
Do you have a benchmark that measures this cost?

I'm pretty sure the cost of checking this in a static language where the tag enums range is known at compile-time is:

- 100x cheaper than cache-miss on a memory access

- and 10000x cheaper than IO which is often where those errors/results/maybe/exceptions issues arise.

I.e. irrelevant in most cases.

There are no comments on this comment yet.