MOO-cows Mailing List Archive

[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

floats and efficiency

I'm developing an in-db "3-d space" type system (as an upgrade/port type
thing) and I've almost decided to use floats as my primary data type
instead of integers.

Does anyone know, or have data, on the efficiency of this?

Some testing I've done seems to show that the server doesn't particularly
care what kind of data type you are using, at least dealing with speed.

There are a lot of "might be necessary" tofloat() 's , because often
integer values are used in this system, but everything is computed and
stored interanally as a float.  

In the old system some code was a server patch, which seems to be horribly
tick inefficient.  The new system uses floats, eliminates the server patch,
eliminates many multiplication and division operations (to emulate floats),
but adds a bunch of float conversions.

So, to simplify:
	Where might I be stepping on efficiency and speed..


Robert Spier <>    
... Any sufficiently advanced technology is indistinguishable from magic.

Home | Subject Index | Thread Index