• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exception handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception handling


  • Subject: Re: Exception handling
  • From: Chris Hanson <email@hidden>
  • Date: Thu, 30 Oct 2003 20:34:19 -0600

On Oct 30, 2003, at 1:51 PM, Michael B. Johnson wrote:
Can anyone comment on why this isn't on by default? In other words, what's the cost (execution speed or app size, or layout in address space) of enabling this? I'd like to put it on by default for my stuff, but I'm not sure if there are carrying costs like C++'s exceptions...

One of the (few) nice things about C++ is that "zero-overhead" exceptions are possible. That is, with a good compiler and no exceptions triggered at runtime there's no speed penalty to using exceptions. You pay the penalty in some additional space (used to store the unwinding information) and in runtime performance when an exception is thrown.


I'm not sure if this is possible for Objective-C exceptions, since I'm not sure how they're implemented under the hood. But if possible, it would be nice. I suspect the current exception implementation looks very similar to the old macro-based implementation in terms of the code generated, if for no other reason than the need to maintain binary compatibility with code using the old exception system.

  -- Chris

--
Chris Hanson, bDistributed.com, Inc.  |  Email: email@hidden
Custom Mac OS X Development           |  Phone: +1-847-372-3955
http://bdistributed.com/              |  Fax:   +1-847-589-3738
http://bdistributed.com/Articles/     |  Personal Email: email@hidden
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Exception handling (From: Martin-Gilles Lavoie <email@hidden>)
 >Re: Exception handling (From: ryan <email@hidden>)
 >Re: Exception handling (From: Frank Midgley <email@hidden>)
 >Re: Exception handling (From: Chris Hanson <email@hidden>)
 >Re: Exception handling (From: "Michael B. Johnson" <email@hidden>)

  • Prev by Date: Re: Code Balancing
  • Next by Date: Re: Can't statically link library if a dylib exists?
  • Previous by thread: Re: Exception handling
  • Next by thread: Re: Exception handling
  • Index(es):
    • Date
    • Thread