|
Geometry : |
Subject: [ggl] Definition of exception types
From: Bruno Lalande (bruno.lalande)
Date: 2009-06-23 05:07:00
Hi Barend,
> I'm not an expert but if I remember well, a try/catch is not free at
> all. Testing a return code is much faster.
>
> I've included this test in the comparison programs and I cannot find any
> difference. If it is for speed alone, it seems that any other measure is
> more effective than this one...
Yep, the difference mostly depends on how long is the execution of the
concerned operation relatively to the overhead implied by nesting it
into a try/catch.
If you choose carefully between exceptions and return codes in all
operations, normally you should be right in most cases. What seduces
me in the proposition above is that it permits to change this "most
cases" into "all cases". But I agree it's not a priority and preview 5
can well be released without that.
Regards
Bruno
Geometry list run by mateusz at loskot.net