---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id ADCB5090068; Fri, 30 Jan 2004 06:44:27 -0800 Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <4.00CC4D49@cherry.ease.lsoft.com>; Fri, 30 Jan 2004 9:44:15 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 9393 for PICLIST@MITVMA.MIT.EDU; Fri, 30 Jan 2004 09:44:10 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 0107; Fri, 30 Jan 2004 09:43:25 -0500 Received: from mail.bookham.com [195.166.17.164] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with ESMTP ; Fri, 30 Jan 2004 09:43:25 EST X-Warning: mitvma.mit.edu: Host mail.bookham.com claimed to be mimesweeper.bookham.com Received: from alpha.bookham.com (unverified) by mimesweeper.bookham.com (Content Technologies SMTPRS 4.3.6) with ESMTP id for ; Fri, 30 Jan 2004 14:44:25 +0000 Received: from pai-smx-01.europe.bkhm.net ([47.203.128.192]) by alpha.bookham.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id CHVN7VRQ; Fri, 30 Jan 2004 14:40:19 -0000 Received: by pai-smx-01.europe.bkhm.net with Internet Mail Service (5.5.2653.19) id ; Fri, 30 Jan 2004 14:43:26 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Message-ID: <23075D38FE1C8144847DFAECA3565F270173E385@pai-smx-01.europe.bkhm.net> Date: Fri, 30 Jan 2004 14:43:25 -0000 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Michael Rigby-Jones Subject: Re: [PIC]: Hitech PICCLITE state machine optimization To: PICLIST@MITVMA.MIT.EDU Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856510 >> From: Mike Rigby-Jones >> I don't understand why you are so concerned with the output of the >> compiler, even using the XOR code it hardly seems like an >> excessively bloated implementation. >-----Original Message----- >From: Herbert Graf [mailto:mailinglist2@FARCITE.NET] >I don't know why I have to EXPLAIN why I am "concerned". You don't have to explain why, I merely stated I did understand why. You are using a free "limited" C compiler and are wondering why the output is not quite up to hand optimised assembly. You generaly get what you pay for, and the point of using a C compiler is for speed of development and ease of maintenance, not for ultimate code size and execution speed. From the differences in code between the full version I use and the Lite version, it would seem that some optimisations have been omitted from the Lite compiler. >> If your timing/space constraints are that tight, >> you should >> probably be coding in assembly anyway. > Wow, that's a useful suggestion... thanks anyways. Your welcome. If you would like another "usefull" suggestion, if you are going to use a switch() construct, check the compilers output carefully. Older versions used to produce a jump table everytime as long as all the case statements were consecutive. Later versions (and probably the Lite version) often produce a string of comparisons instead of a jump table, and I don't know what causes it to choose one or the other. Another method to construct a state machine is via a function pointer, or an array of pointers. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body .