[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaProfiler 2.0
- From: Glenn Maynard <glenn@...>
- Date: Wed, 15 Jun 2005 18:39:06 -0400
On Wed, Jun 15, 2005 at 03:07:52PM -0700, Chris Marrin wrote:
> Actually all machines can have all these data types, it's just a simple
> matter of software :-)
That's purely intellectual; if a machine doesn't have doubles in hardware,
softawre emulation is uselessly slow.
> For me, I really need to use doubles for two reasons.
> 1) it is the only practical datatype understood by Lua and
That's not true; I use Lua with lua_Number set to "float", and it works fine.
Of course, I have to bear precision in mind when using it, but it's certainly
practical for many uses.
> 2) it is easier for content
> authors (non-programmers) to understand 1.5 seconds than 1500000
> microseconds.
That's an implementation detail; non-programmers don't care how you're
representing times internally. printf("%i.%06i", i/1000000, i%1000000);
(Just responding to points--if you don't need to target a platform
without doubles, there's probably no major benefit either way. I
just prefer the predictability of integers, in addition to needing
to avoid doubles.)
--
Glenn Maynard