4 ms·
If you don't throw there's no overhead, hence Exception-al cases only. The Optional style always has an overhead but the cost of actually throwing is much less.
by mhh__ 4y ago
If you don't throw there's no overhead, hence Exception-al cases only. The Optional style always has an overhead but the cost of actually throwing is much less.
Lots of people do statically allocate their errors now.
Implementing stack unwinding properly is not trivial.