Re: henyepMail [SPAM Suspected] Re:[cpp]请问:3000个try{}catch{}宏是否会影响程序的性能呢?

巤邓 tdzl2003 at gmail.com
Tue Feb 19 12:10:19 CST 2008


-____________-
何必在这里就try
崩溃的地方throw,既然要崩溃了,在程序最外面写一个catch就好了。
throw的话,正常运行应该是不会发生的,所以既然不发生,就不影响效率了
至于SEH&# 8230;&# 8230; 一般release版本可能自己处理SEH以捕获异常,但debug版本不需要了吧&# 8230;&# 8230;


On 12/28/07, Carl Liu(Henyep SZ) <xxliu at cn.henyep.com> wrote:
>
> 这个应该可以了, 采用SEH通过EIP寄存器可以把地址记录下来, 再查MAP文件也就可
> 以得出错位置了。谢谢
>
> -----------------------------------
> Regards
>
>
>                    Carl
> -----------------------------------
> -----Original Message-----
> From: cpp-bounces at codingnow.com [mailto:cpp-bounces at codingnow.com] On
> Behalf
> Of 徐梓鼎
> Sent: 2007年12月24日 17:15
> To: C++ Discuss Group
> Subject: Re: henyepMail [SPAM Suspected] Re:[cpp]请问:3000个try{}catch{}宏
> 是否会影响程序的性能呢?
>
> 你不应该在for里面try。这样性能差距很大。
>
> 或许这个能帮到你  http://www.eptacom.net/pubblicazioni/pub_eng/except.html
> ,这个只需要设置一次
>
> 在2007-12-24来自xxliu at cn.henyep.com的邮件[RE: henyepMail [SPAM Suspected]
> Re: [cpp]请问:3000个try{}catch{}宏是否会影响程序的性能呢?]中写到:
>
> > 测试代码是这样, 我这个方法来定位程序的出错位置不太好。 你刚才所提到的关于
>> > WINDOS CORE DUMP机制来定位出错位置,可否说得更详细一些。
>
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20080219/865ec70d/attachment.html


More information about the Cpp mailing list