Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #6425 > unrolled thread

Re: need argument for try catch blocks

Started byAlexei Zakharov <alexeiz@gmail.com>
First post2011-06-08 08:37 -0700
Last post2011-06-09 14:05 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.lang.c++


Contents

  Re: need argument for try catch blocks Alexei Zakharov <alexeiz@gmail.com> - 2011-06-08 08:37 -0700
    Re: need argument for try catch blocks Ian Collins <ian-news@hotmail.com> - 2011-06-09 07:47 +1200
      Re: need argument for try catch blocks "Martin B." <0xCDCDCDCD@gmx.at> - 2011-06-09 14:05 +0200

#6425 — Re: need argument for try catch blocks

FromAlexei Zakharov <alexeiz@gmail.com>
Date2011-06-08 08:37 -0700
SubjectRe: need argument for try catch blocks
Message-ID<6527c940-7e6f-4fc8-a3bb-6e08478ae131@glegroupsg2000goo.googlegroups.com>
On Friday, May 27, 2011 2:40:57 AM UTC-4, Juha Nieminen wrote:
>   In general try/catch blocks do not make the code any slower, so an
> efficiency argument is unjustified.

Try/catch blocks significantly impede optimizations on some compilers.  So they effectively make code slower.

[toc] | [next] | [standalone]


#6440

FromIan Collins <ian-news@hotmail.com>
Date2011-06-09 07:47 +1200
Message-ID<95a1v7FrnrU3@mid.individual.net>
In reply to#6425
On 06/ 9/11 03:37 AM, Alexei Zakharov wrote:

Please don't use the sociopathic "new" google interface, it ruins threading.

> On Friday, May 27, 2011 2:40:57 AM UTC-4, Juha Nieminen wrote:
>>    In general try/catch blocks do not make the code any slower, so an
>> efficiency argument is unjustified.
>
> Try/catch blocks significantly impede optimizations on some compilers.  So they effectively make code slower.

Care to cite an example where this is true?

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#6483

From"Martin B." <0xCDCDCDCD@gmx.at>
Date2011-06-09 14:05 +0200
Message-ID<isqcts$a6j$1@dont-email.me>
In reply to#6440
On 08.06.2011 21:47, Ian Collins wrote:
> On 06/ 9/11 03:37 AM, Alexei Zakharov wrote:
>
> Please don't use the sociopathic "new" google interface, it ruins
> threading.
>
>> On Friday, May 27, 2011 2:40:57 AM UTC-4, Juha Nieminen wrote:
>>> In general try/catch blocks do not make the code any slower, so an
>>> efficiency argument is unjustified.
>>
>> Try/catch blocks significantly impede optimizations on some compilers.
>> So they effectively make code slower.
>
> Care to cite an example where this is true?
>

For example, the Visual C++ compiler will [refuse][1] to inline any 
function that contains a try catch block.

Not sure if this is relevant from a performance POV, but it does show 
that it can impact optimizations.

cheers,
Martin


[1] Warning C4714 : 
http://msdn.microsoft.com/en-us/library/a98sb923%28v=VS.100%29.aspx

-- 
Stop Software Patents
http://petition.stopsoftwarepatents.eu/841006602158/
http://www.ffii.org/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web