[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: new API easier to use? (was: Embedding Lua for use in a MUD.)
- From: "John Belmonte" <jvb@...>
- Date: Wed, 14 Mar 2001 10:40:05 +0900
> 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.
Maybe the question should be: Should an integer divide stand in a way of a
useful feature? Without writing an implementation and running a performance
comparison on real apps, I think any statement about a performance problem
is just a guess. (Some things to consider: Is the operation significant in
a real program? Is an integer divide slower than a shift? Does the
optimizer convert a constant divide into a shift/add combo?)