lua-users home
lua-l archive

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


A lot of strange assumptions there..

First, "all languages that do not compile to native machine code have some overhead"
As opposed to JIT compiled languages that can take stuff into account discovered at runtime, which a static compilation cant?
Having a jit compiler can improve cache coherency for you, which is tedious to do otherwise, among other things.
Static compilers have had 20+ years headstart on research, which makes jit compilers downright impressive to me.
The fact that -one- person (mike pall) alone can produce a jit compiler that takes a relatively 'simple' language like lua,
and push it to the levels he has, says alot too.
Seriously, which compiler do you think will be more prevalent in say, 5-10 years time, when research -really- catches up?


Second, "any slight overhead is multiplied a huge number of times"
That's just weird and strange, and begs for a description of what you think "huge" means, and where that multiplication comes from?



On 2010-10-13 15:32, HyperHacker wrote:

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" <keinhong@gmail.com> 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.



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