Date: Thu, 18 Jan 2001 16:51:28 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Mike Darrett cc: djgpp AT delorie DOT com Subject: Re: compiler efficiency In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 17 Jan 2001, Mike Darrett wrote: > I was running some algorithm benchmarks on DJGPP vs Borland C++ 5.5, and > was shocked to see that DJGPP outperformed Borland C++ on some stack > tests. Using a linked list to simulate a stack, adding and removing 80,000 > entries took 1.8 seconds on my AMDK6-2 350, but took 2.5 seconds on > Borland C++, compiled without the -tW option (since it is a console app). > > Any ideas? Is Borland C++ using thunking to access memory? Is DJGPP simply > more efficient? Did you try to look at the machine code in each case? That might give you some clues. Another possibility might be code and/or data alignment. Latest versions of GCC and DJGPP do a good job there; does Borland come anywhere near?