From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: Optimizations Date: Tue, 29 Sep 1998 10:13:13 -0400 Lines: 27 Message-ID: <3610EAF9.A58@erols.com> References: <360996D2 DOT 382F AT erols DOT com> <3610272A DOT E54C23F7 AT mailexcite DOT com> Reply-To: johnfine AT erols DOT com NNTP-Posting-Host: 207-172-240-144.s17.as3.bsd.erols.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Doug Gale wrote: > What are you making that requires such extreme performance that you are willing > to sift through the assembler and make sure it sqeezes every drop of speed from > the machine? If your application is SO performance sensitive, why target it for > a junky old 486 with no L2 cache? :) The "junky old 486 with no L2 cache" is the hand held computer that my employer manufatures. It is (very well) designed for ruggedness and long battery life, not for CPU power. By writing the frequently used routines in assembler, I achieve very good performance. In this project I needed to have a set routines in portable C for running the same routines on other platforms. For maintenance reasons I wanted to have just one version of the source code without a lot of conditional compilation. After trying it that way, I gave up on the idea of single source code and switched back to writing the 486 version in assembler. > Besides, algorithmic optimizations will always make a bigger improvement than > low-level optimizations anyway. As the old saying goes: the fastest instruction > is the one you never execute! I think I got the algorithm optimized before I started worrying about the low-level optimizations. -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/