Closed ruipacheco closed 7 years ago
Bump
I have not investigated it. The answer likely is: it depends -- on the specifics of how/where you use it.
Would be nice if you could shed some light on it !
@ruipacheco At the ACCU 2017 Conference, Niall Douglas did a talk on std::expected
:
Mongrel Monads, Dirty, Dirty, Dirty - Niall Douglas [ACCU 2017]
57 minutes in is a section Benchmarking performance; Why not just throw exception and save all this hassle?
Tutorial text and code as in video (Github repo for Boost.Outcome).
Will check it asap.
Is expected-lite much more expensive than using exceptions? It's very practical and would lead to significantly cleaner code than exception handling but what is the runtime cost?