[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: new API easier to use? (was: Embedding Lua for use in a MUD.)
- From: Reuben Thomas <rrt@...>
- Date: Wed, 14 Mar 2001 09:53:36 +0000 (GMT)
> We thought about that for Lua 4.0, but it brings a performance problem.
> In many machines (Linux, for instance), the size of a TObject is not
> a power of 2, and so the difference between two (TObject *) is not
> an efficient operation.
i.e. because a division is needed to go from address difference to stack
slot number. I'm not even sure this is a reasonable argument: after all,
you're dividing by a constant, which any compiler worth its salt turns into
a multiplication, which is cheap on almost all machines you'd be running Lua
Wasting programmer time to gain machine time is rarely worth it, and really
needs to be backed up with figures. Here it really doesn't seem worth it at
all, unless I'm missing something big.
http://sc3d.org/rrt/ | Caution Children At Play Drive Slowly