Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 789213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:29:16+00:00 2026-05-14T21:29:16+00:00

Exception handling on Windows boxes (at least for C++) takes a performance hit if

  • 0

Exception handling on Windows boxes (at least for C++) takes a performance hit if you exit a try block prematurely (such as executing a return statement) the same as if an exception were thrown.

But what about C#? Is there a performance hit for returning prematuraly from a try block, whether through a return statement or break statement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:29:16+00:00Added an answer on May 14, 2026 at 9:29 pm

    If there is a performance hit, it’s tiny. It’s certainly nothing like the same as catching the exception. (And even that’s not as bad as many people think.)

    As far as I’m aware, the performance of returning from a try block is negligible. The chance of it being significant in your app is essentially 0. Just write the most readable code you can, and then benchmark/profile your app – that will be a much better way to get good performance than trying to second guess this sort of thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Most program languages have some kind of exception handling; some languages have return codes,
I am implementing exception handling for our BizTalk services, and have run into a
Question: Is exception handling in Java actually slow? Conventional wisdom, as well as a
For testing exception handling in the case of a broken connection it is useful
I know two approaches to Exception handling, lets have a look at them. Contract
I recently read Object Oriented Exception Handling in Perl Perl.com article. Is there any
I've never been completely happy with the way exception handling works, there's a lot
I admit it: I don't bother with too much exception handling. I know I
I've worked in shops where I've implemented Exception Handling into the event log, and
This article gives a good overview on why structured exception handling is bad. Is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.