[J3] [EXTERNAL] Re: Exception handling - Golang proposal
Van Snyder
van.snyder at jpl.nasa.gov
Wed Jul 24 23:54:25 EDT 2019
On Wed, 2019-07-24 at 21:34 -0600, Ondřej Čertík via J3 wrote:
> I agree with you Van that I would like to see some actual code that
> slows down. I was hoping Stockfish could do it, but it's an example of
> a C++ code that does not slow down. If somebody finds some other code
> that shows the actual slowdown, I would be interested.
C++ code that slows down when compiled with exception handling enabled
is probably irrelevant. Things that happen in C++ do not inevitably
happen in other languages. Given that Ada processors do not have these
problems, there are probably things to learn about what not to do by
studying C++ exception handling.
Bob remarked
Each point in the program where an exception might occur becomes
a sequence point, which can block code motion and adds branches
to the control flow graph (CFG).
If exception handling is truly block oriented, i.e., there is no attempt
to recover and continue on a statement-by-statement or
operator-by-operator basis, there shouldn't be any new sequence points.
Branch targets would be the block's exception handler (which might be in
a containing block) or code in a procedure that raises an exception in
the caller if it's not handled in the procedure. This doesn't seem to
be much different from ERR= in a READ statement, or alternate returns.
More information about the J3
mailing list