<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Long jumps considered way more harmful than exceptions</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/10/16/53232.aspx</link><description>In the dark days before exception handling you could always use setjmp/longjmp to do non-local gotos. In fact, the script engines are compiled in C++ with exception handling turned off and the mainline loop of the bytecode interpreter uses setjmp-longjmp</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>RE: Long jumps considered way more harmful than exceptions</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/10/16/53232.aspx#53236</link><pubDate>Fri, 17 Oct 2003 20:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53236</guid><dc:creator>RJ</dc:creator><description>Sorry if it appears I am being awkward, I'm not - I'm just interested in learning to be optimal :)&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=53236" width="1" height="1"&gt;</description></item><item><title>RE: Long jumps considered way more harmful than exceptions</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/10/16/53232.aspx#53235</link><pubDate>Fri, 17 Oct 2003 18:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53235</guid><dc:creator>Eric Lippert</dc:creator><description>&amp;gt; What was the measured cost when C++ exceptions were turned on?

You're asking me for the numbers which we measured on Pentium 1's seven years ago?  I haven't got them on me, sorry.  But it was significant.

&amp;gt; It would be interesting to know *which* performance reasons these were

The overall cost, not the per-exception cost, killed our performance on the server. Exception handling adds additional code to every function, and that additional code has a nonzero run time.  Since the purpose of the code -- handling exceptions -- was NEVER going to be fulfilled becasue we never THREW an exception, we turned it off.
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=53235" width="1" height="1"&gt;</description></item><item><title>RE: Long jumps considered way more harmful than exceptions</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/10/16/53232.aspx#53234</link><pubDate>Fri, 17 Oct 2003 11:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53234</guid><dc:creator>RJ</dc:creator><description>&amp;quot;In fact, the script engines are compiled in C++ with exception handling turned off (for performance reasons)&amp;quot;

It would be interesting to know *which* performance reasons these were after your reply to my comment in &amp;quot;I take exception to that&amp;quot;  - sorry for being facetious 8*)
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=53234" width="1" height="1"&gt;</description></item><item><title>RE: Long jumps considered way more harmful than exceptions</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/10/16/53232.aspx#53233</link><pubDate>Fri, 17 Oct 2003 07:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53233</guid><dc:creator>MM</dc:creator><description>What was the measured cost when C++ exceptions were turned on?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=53233" width="1" height="1"&gt;</description></item></channel></rss>