lua-users home
lua-l archive

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


Roberto wrote:
> 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?)

Regards,
-John