(correctly sending to the list)

> > Optional values often require allocation (and, therefore, garbage collection). Unless your process is so short-lived that the garbage collector never runs, exceptions are going to be faster. So, if you benchmark this, make sure your benchmarks run for a while.
> >
> > Someone who knows the compiler better than I will be able to tell you if (Some x) when immediately pattern-matched across a function call causes an allocation.
> >
> > Constant exception constructors like Not_found, I believe, require no allocation in recent versions of OCaml.
> >
>

The cost of an exception is not just its allocation. You also need to setup the exception handler. Also, backtrace recording is not cheap, so one should use raise_notrace primitive for cases like this.