[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Integer patch
- From: Gavin Wraith <gavin@...>
- Date: Mon, 10 Apr 2006 13:04:36 +0100
In message <436dcc63d0a64b9ce682e7d846b8c149@pobox.com> you wrote:
>
> On Apr 06, 2006, at 12:12, Gavin Wraith wrote:
>
> > Thanks to all for the well intentioned advice about Asko
> > Kauppi's Integer patch. Unfortunately it has exactly the wrong
> > behaviour for my purposes. My OS assumes 32-bit integers with
> > no overflow behaviour. -1 must be the same as 0xffffffff, for
> > example. #defining LUA_NUMBER to int solves the problems of
> > calling OS routines at a stroke, but leaves me with no
> > floats. Lisa Parratt has confirmed what I was coming to suspect,
> > that major recoding is necessary to have two numeric types.
> > It is probably not worth the effort. I did use the mapm library
> > to implement bignums at one stage, but again it was not really
> > worth the candle.
>
> Is userdata (boxed 32-bit unsigned ints, yay!) too slow or too
> cumbersome for your requirements?
Yes. 98% of my arithmetic usage is integer. I would rather not have
the tail wag the dog.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/