[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Suggestion: non-taggable (raw?) tables
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 24 Nov 1999 08:21:07 -0200 (EDT)
>From email@example.com Wed Nov 24 01:09:04 1999
>From: Dave Bollinger <DBollinger@compuserve.com>
> It might be nice if it were possible to permanently designate a table as
>"raw" if it were known that no tag methods would be used on it. (in fact,
If there are no tag methods for the tag of the table, then all accesses to
it are raw.
>This purely for
>performance reasons, to avoid the overhead of the full tag method checking,
I've just looked at the code (GETTABLE in lmv.c) and I don't see that
there's a performance hit: it's a couple of C function calls, probably
costing the same as a couple of instructions in Lua.
I've said this before here in lua-l, but here it goes again:
The performance of Lua is concentrated on opcode interpretation.
This means that everything in Lua costs more or less the same thing: i=i+1
and f:a(1,2,3) take more or less the same time.
Moreover, Lua is said to be one of the fastest scripting languages around.
As a programmer, I do understand this "urge" for efficiency, but an scripting
language is something different from C, and we all have to get used to it,
and its performance characteristics.
So, I do sympathize. But, do you have a *need* for more speed?
Would you application run faster even if GETTABLE had zero cost?