Anybody may help to explain the issue of the source code , next "try-throw-catch" will cost more cpu time than previous one
f z
zhangjiakouzf@yahoo.com.cn
Fri Jan 2 14:17:00 GMT 2009
Andrew ,
Thanks a lot for your explaining !
Miles
--- 09年1月2日,周五, Andrew Haley <aph@redhat.com> 写道:
> 发件人: Andrew Haley <aph@redhat.com>
> 主题: Re: Anybody may help to explain the issue of the source code , next "try-throw-catch" will cost more cpu time than previous one
> 收件人: "f z" <zhangjiakouzf@yahoo.com.cn>
> 抄送: gcc-help@gcc.gnu.org
> 日期: 2009,12,周五,5:48下午
> 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.
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
More information about the Gcc-help
mailing list