Anybody may help to explain the issue of the source code , next "try-throw-catch" will cost more cpu time than previous one
Andrew Haley
aph@redhat.com
Fri Jan 2 09:50:00 GMT 2009
f z wrote:
> Andrew,
>
> I compile the release version of the test code with VC 6.0 and run it on windows xp sp2 ,
> but it took the same time in every try_throw_catch block ,so perhaps we can do something to improve the preformance
VC uses a very different technique.
DWARF exception handling, as used in GNU/Linux systems, has
essentially zero overhead as long as an exception isn't thrown.
However, this does mean that in the rare case when an exception
is thrown, there is some searching to do. On balance this is a
good compromise, as long as throwing an exception really is rare.
Andrew.
More information about the Gcc-help
mailing list