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 6970521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:43:13+00:00 2026-05-27T16:43:13+00:00

My question here is pretty simple: I want to know if processors try to

  • 0

My question here is pretty simple: I want to know if processors try to help exception handling somehow. Would it be possible to completely remove overhead from exception handling and throwing if enough effort is put in designing a processor “exception-ready”?

Because as far as I know, all exception handling is done via software, and that always adds some overhead. Am I wrong?

— edit

So, thanks for all the answers below. I appreciate. You have answered my question.

But just to clarify why I asked this: generally, people don’t go too deep into optimizing exceptions because they all think “exceptions are for exceptional circumstances”, and therefore they are no bottleneck.

I don’t think exceptions should only be thrown under dramatic circumstances. What I think is, basically, that an exception should be thrown anytime a function cannot comply to what it promised to do.

If I say:

doSomethingImportant();

And if for whatever reason “something important” can’t be done, this should throw an exception.

Of course, doSomethingImportant() might not be able to comply because the system ran out of memory (a dramatic problem), but I think we should be able to model simpler “I can’t do that now/this time, sorry” into our software, embedded into our designs. I’d like to say that I think exceptions can be exceptional, yes, but they are to be expected like normal software flow, not as a “fatal error” from which the system has to “recover”, nomsain?

And while big applications backed by nice data centers will hardly ever bottleneck because of exception handling, please don’t forget there’s market for embedded devices where resources are counted, and exception handling does have an impact (which is what I’m aiming for).

I personally find exceptions quite expressive, and I’d like to use them in embedded devices with as much “overhead” as I would get by returning “-1” and checking that with an “if”.

  • 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-27T16:43:13+00:00Added an answer on May 27, 2026 at 4:43 pm

    In Instruction Set Architecture documentations, exceptions are abnormal situations for processors (like zero-divide, illegal instructions, etc..). They are usually translated to interrupts (but most interrupts are external signals to the processor).

    In programming language specifications, exceptions are non-local control flow constructs, usually involving some kind of call stack unwinding.

    I believe that recent micro-architectures handle specially the stack pointer (for instance w.r.t. caching and instruction scheduling). They probably have some circuits dedicated to stack pointers changes required by programming language exceptions.

    Some languages and implementations have better exception semantics and machinery than others. For example, Ocaml exception handling is faster than C++ one (at least with the GCC compiler).

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

Sidebar

Related Questions

Pretty simple question here, hoping for a simple answer. I want to display my
Should be pretty simple question here. I have @Html.EditorFor(model=>model.Training) I dont want to show
I'm pretty sure this is a simple question in regards to formatting but here's
Pretty simple question, hard to find an answer: I want to Serialize in JSON
I want to achieve a pretty simple task, but none of the solutions here
Pretty simple but specific question here: I'm not entirely familiar with the JPEG standard
I got pretty experienced with testing controllers, my question here is though, aren't we
Here is a pretty theoretical and abstract question: How Service-oriented architecture (SOA) differs from
My question is pretty vague :o) - But here is an example : When
Simple question here: is there any way to convert from a jagged array to

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.