Path: utzoo!attcan!uunet!know!sdd.hp.com!decwrl!sgi!shinobu!odin!cashew.asd.sgi.com!kurt From: kurt@cashew.asd.sgi.com (Kurt Akeley) Newsgroups: comp.sys.sgi Subject: Re: C switch performance Message-ID: <1990Oct10.165114.3645@odin.corp.sgi.com> Date: 10 Oct 90 16:51:14 GMT References: <1990Oct4.173210.9511@odin.corp.sgi.com> Sender: news@odin.corp.sgi.com (Net News) Reply-To: kurt@cashew.asd.sgi.com (Kurt Akeley) Organization: sgi Lines: 10 Regarding the performance of switch statements on Silicon Graphics R3000-based processors, there really is a performance loss when the cases are sorted. An unnecessary jump instruction is included in this case. Apparantly this bug had already been eliminated in the SGI-internal compiler being prepared for a subsequent release. Thanks for the many notes suggesting other explanations, and special thanks to Dave Ciemiewicz, who had the real explanation. -- kurt