[hatari-devel] LMC1992 and Microwire emulation

Eero Tamminen eerot at users.berlios.de
Sun Mar 21 12:07:35 CET 2010


Hi,

On Sunday 21 March 2010, David Savinkoff wrote:
> I have a 3 part explanation in the hataribug.txt attachment.

> As for converting floats to ints; Maybe floats are ok. They
> can simplify code to the point of where it is more efficient
> on computers since the 486 era.
>
> What platforms will have problems?

There are still CPUs without FPU being used in devices, but those kind of
CPUs are anyway a bit too slow to run Hatari, so I think they can be
ignored.

I think desktop computers deal faster with doubles, whereas with latest ARM
CPUs (currently used in latest phones and soon also in netbooks) doubles are
much slower than floats (besides taking double the memory), despite them
having an FPU.

Whereas integer operations are always faster than *same* operations in
floating point, if CPU includes FPU, floats are faster than emulating
floating point calculations with e.g. fixed point integers arithmetics.  And
if one needs to do conversions between floating point and integers, that's
a heavy floating point operation too...

So, it makes sense to use integers, if the work can be done "naturally" with
them, using floats loses accuracy, or there would be a need for a lot of
conversions between floating point and integers (calculated by amount
of data on which it's done, not by lines of code :-)).


	- Eero



More information about the hatari-devel mailing list