• 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: Switch efficiency for large case-sets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Switch efficiency for large case-sets


  • Subject: Re: Switch efficiency for large case-sets
  • From: Buddy Kurz <email@hidden>
  • Date: Thu, 29 May 2003 07:34:56 -0700

? how would one do that ?


On Thursday, May 29, 2003, at 07:06 AM, Clark S. Cox III wrote:

Anyone have any idea how efficient the switch statement is for very large case-sets, e.g. 500 cases? I'm hoping the compiler comes up with intelligent ways of performing the required conditionals, and doesn't just expand the switch out to a bunch of if..else's...

In this particular case I'm switching on a uint32, so it wouldn't be too much trouble for me to break it down into if's and smaller switches, if necessary.

Why don't you just look at the generated assembly, and see for yourself?

http://homepage.mac.com/clarkcox3/
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Switch efficiency for large case-sets
      • From: "Clark S. Cox III" <email@hidden>
References: 
 >Re: Switch efficiency for large case-sets (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: Re: NSBrowser selection
  • Next by Date: Sending AppleEvent from Carbon To Cocoa App
  • Previous by thread: Re: Switch efficiency for large case-sets
  • Next by thread: Re: Switch efficiency for large case-sets
  • Index(es):
    • Date
    • Thread