I did some benchmarking a while ago. You can find the summary here: https://hal.inria.fr/inria-00432575/PDF/monad.pdf Cheers, David On 16/09/15 21:08, Helmut Brandl wrote: > Hi all, > > I use exeption handling quite frequently even in inner loops. A common > pattern: > > let some_function ... = > ... > if cannot_compute then raise Not_found else value > > try > let value = some_function ... in > ... > with Not_found -> > handle_exception > > I use this pattern even if the direct caller of "some_function" handles > the exception. In many cases I could design "some_function" in a way > that it returns an optional value and check the optional value in the > caller. Is this significantly (at least 10%) faster? If not, I would > stay with my present design. However I am pressed for performance in the > inner loops (I am only interested in compilation to native). > > Is there any information available on the preformance penalty of > exception handling? Any hints? Thanks in advance. > > Regards > Helmut >