lua-users home
lua-l archive

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

For anyone interested, I've been using a patch that adds bit operators and an integer type, which works more or less transparently. It's from the wiki, with some fixes and tweaks; never got around to posting it but if anyone wants, just ask. C libraries do have to be recompiled with the modified headers as it doesn't look feasible to add the new type to the end of the enum due to some assumptions Lua makes about its ordering.

As for implementing complex operations such as FFT: all languages that do not compile to native machine code have some overhead, and in these situations any slight overhead is multiplied a huge number of times. Whether Lua without JIT has enough overhead to make such operations unusably slow can only be determined by implementing it and seeing - and then you've already implemented it, so whether it's slow or not, you may as well release it for anyone who might still want it.

Apologies if this reply ends up at the top. My new phone isn't making it clear where my text will go.

On 2010-10-13 7:18 AM, "KHMan" <> wrote:

On 10/13/2010 8:52 PM, Bogdan Marinescu wrote:

> On Wed, Oct 13, 2010 at 3:40 PM, Enrico Colombini wrote:
>> On 13/10/2010 14.12, KHMan wrote...

I agree with that. If there is a lot of bit ops, I think there is a good case to bite the bullet and use bitwise operators. I would want that too on an embedded system.

Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia