On Thu, Aug 1, 2013 at 12:38 AM, Bennie Kloosteman <[email protected]>wrote:

> It is worth noting here that its exceptionally slow in Debug mode  ( may
> be a factor of 10^5 to  10^6 slower)  , in release mode its not too bad...
> but its certainly not  fast .
>

Agreed, CLR exceptions are *much* slower in debug mode. I *suspect* a
significant portion of this is trapping to the debugger to give it a chance
to do something where the exception was triggered.


> In release mode you could do  300K-  1M fail / catch exceptions per second
>  but  is that needed ? Is it good programming ?  Thats what tryparse type
> methods are  all about.
>

Why write code using two different error return methods? Personally I think
writing solid bug-free code once is enough. I'd like to stem the geometric
expansion caused by mechanisms which require us to write two versions of
code.


> Its kind of anoying too , sometimes i like  to check  thrown exceptions in
> the debugger and when you have exceptions for logic  you loose that
> abbility.
>

That is a problem with debuggers and exception handling facilities. We
shouldn't "solve" this by making exceptions slow and then telling
programmers to not use them often, ohh and write a second version of all
your functions incase someone needs them fast.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to