使用执行处理的性能惩罚 [英] perfomance penalty in using execption handling..
问题描述
有没有人知道使用异常时的性能损失
处理(特别是用g ++)
Abhishek
A. Saksena写道:
在使用异常处理(特别是使用g ++)时,是否有人知道性能损失
你能编写一些函数,调用它们10,000次,测试它们吗?
运行它们在编译器中打开和不启用异常处理?
(为什么你需要表演?)
-
Phlip
http://industrialxp.org/community/bi...UserInterfaces
一种。 Saksena写道:
在使用异常处理(特别是使用g ++)时,是否有人知道性能损失
>
我做了一些小测试你可以在这里看一下:
http://3miasto.net/~chq/c/carray.txt
Best
Darek
http: //www.codeproject.org/cpp/excep...asp#xx515459xx
许多编译器不支付任何性能损失,除非例外
扔了...所以如果你这样编码,那个例外真的很特别,
你应该
没有罚款...
" A. Saksena < AB ************** @ philips.com>在消息中写道
news:ch ********** @ voyager.news.surf.net ...
任何人都知道在使用异常处理时的性能损失(特别是使用g ++)
Abhishek
Hi,
Do anybody have an idea of the performance penalty while using exception
handling (specially with g++)
Abhishek
A. Saksena wrote:
Do anybody have an idea of the performance penalty while using exception
handling (specially with g++)
Can you write a few functions, call them 10,000 times, time test them, and
run them with and without exception handling turned on in the compiler?
(And why do you need performance?)
--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
A. Saksena wrote:Hi,
Do anybody have an idea of the performance penalty while using exception
handling (specially with g++)
I''ve done some small tests you can look at it here:
http://3miasto.net/~chq/c/carray.txt
Best
Darek
http://www.codeproject.org/cpp/excep...asp#xx515459xx
lots of compilers do not pay any performance penalty, unless an exception
is thrown... So if you code that way, that exceptions are truly exceptional,
you should
have no penalty...
" A. Saksena" <ab**************@philips.com> wrote in message
news:ch**********@voyager.news.surf.net...Hi,
Do anybody have an idea of the performance penalty while using exception
handling (specially with g++)
Abhishek
这篇关于使用执行处理的性能惩罚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!