[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Clean the table
- From: "Josh Jensen" <joshj@...>
- Date: Tue, 29 Jan 2002 11:43:52 -0800
The new Lua 4.1 builds include a separate array and hash for each table.
Maybe some magic could be done there?
Josh
--------------
> I have a table:
> t={ 1,2,3,4,...9999,10000; a="new", b="old"}
> Which is the best and faster way to clean
> the lfieldlist "[1]...[10000]" from the table?
The fastest way, if you are doing this a lot, is to keep the vector part
in a separate table:
t = {vec = {1, 2, 3, 4...}, a = "new", b="old}
Then you can clean the things out with:
t.vec = nil
----------------