Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.sys.intel Subject: Re: PLM vs. C for 80286/80386 Keywords: PLM C Message-ID: <1765@auspex.auspex.com> Date: 6 Jun 89 23:44:08 GMT References: <598@philtis.UUCP> <14381@bfmny0.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 10 >For instance if you want a CASE driven state machine in a critical >interrupt handler, PL/M implements DO CASE as a jump indirect indexed >off a short array of offsets, e.g. JMP CASETBL[BX]. C on the other hand >does 'switch' as a full if-then/elseif-then/elseif-then... series. I sincerely hope Intel's C compiler does not do so for *all* "switch" statements; any competent C compiler can and will turn a "dense" "switch" statement - i.e., one where the cases form a reasonably tight range - into an indexded jump. (The definition of "dense" varies from compiler to compiler.)