X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: msoft-float option with DJGPP Date: 17 Nov 2004 12:02:33 GMT Lines: 37 Message-ID: <300supF2ra50iU3@uni-berlin.de> References: <200411160505 DOT iAG551Qb009789 AT delorie DOT com> <18664 DOT 041117 AT mail DOT ru> X-Trace: news.uni-berlin.de BWt/3qIUe1ZVgqd4Trs7pgOTBy7IWisFUSbCd7CT2LQtvZWcHiq5zMkY2r X-Orig-Path: not-for-mail To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alexander Mironenko wrote: > >> I know about "-lemu" option but in my case this option means severe > >> slowdown (up to several times). > > And what makes you think -msoft-float wouldn't cause that same kind > > of slowdown? > I have a Borland C application (let's say a game) giving me 20 fps > on FPU-less board. It was compiled with Borland's emulation option. Depending on which of Borland's emulation options that was, you may be comparing apples to oranges there. Borland has at least one software floating point option where the number format is rather heavily different from standard floats as processed by the FPU. > I replaced graphic output routines with allegro's (game programming > library) analogs and recompiled game with DJGPP and "-lemu" option. > Result: 7 fps. Have you tried the wm emulator, too? Did it make a difference? > So I digged into my source and found that every frame I do > approximately 400 floating point multiplications. I replaced > most of them with fixed point analogs (all numbers were relatively > small) and now instead of 7 fps I have 57 fps - it means that > graphic routine was fast (I haven't changed it) and floating point > calculations were slow. So why not just keep those fixed point routines in there and consider the matter settled? Specifically targetted optimization like that will practically always beat any possible floating point emulation, no matter how efficient that may be. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.