in the docs it says that exceptions in julia are implemented using tasks.

can i take that to mean that they come with a significant overhead?

and do you pay for that overhead even if the exception is not thrown?

in particular, what is the best way to handle errors in fairly tight loops:
 1 - exceptions
 2 - maybe types (ie unions with nothing)
 3 - (flag, result) tuples (result is not a union but you have a tuple to 
unpack)
and does that change if the excptions are common (say, 10% of loops) or 
rare (0.1%)?

the reason i ask is that i am thinking of writing a regular expression 
engine in julia (i know it already has an interface to pcre, but it might 
be cool to have regular expressions over things other than characters, for 
example).  that needs an efficient inner loop, but is also fairly complex, 
and i'm trying to sketch out how things might work.

thanks,
andrew

Reply via email to