Mail Archives: djgpp/2004/11/17/07:15:20
Alexander Mironenko <a_mironenko AT mail DOT ru> 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.
- Raw text -