lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, 24 Nov 2000, Reuben Thomas wrote:

> > > The main reason for using float instead of double is to reduce memory use,
> > > Someone in the list mentioned that doubles in some machine were very slow.
> > > I'd like to hear more about this.
> > 
> > For heavy maths (in this case 3D on x86), using exclusively floats for
> > floating point maths can provide better performance.  (yeah, I know - a
> > marginal difference but why not try)
> In an interpreted language such as Lua, this is unlikely to make any
> difference on a machine with hardware floating-point support: any speed gain
> by using floats will probably be lost in the fetch-decode-execute cycle of
> interpretation (which takes a high proportion of total execution time).
> Because of this, I'd be especially interested to hear if using floats for
> Lua's numbers does actually help.

When we have something of consequence to test(_hopefully_ next week), I'll
post some comparisons.  I realize that it will make negligable difference
but, at the very least I have a greater understanding of the inner
workings of the api :)