From: "Andrew Crabtree" Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP division optimisations Date: Mon, 13 Jul 1998 16:17:42 -0700 Organization: Hewlett-Packard, Roseville Lines: 13 Message-ID: <6oe4in$1m7$1@rosenews.rose.hp.com> References: <35AA8994 DOT 3FC1 AT virgin DOT net> NNTP-Posting-Host: ros51675cra.rose.hp.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk >on long integers. In the source code I used x /= 2; y /=2; for clarity, >on the assumption that the compiler would replace these operations with >shifts.However, it seems this isn't a valid assumption. Replacing the code with >x >>= 1; y >>= 1; made a large speed up. Just a guess, but maybe GCC only does that optimization on unisignd integers, not signed integers. Andy