lua-users home
lua-l archive

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


> > How to do it most effectively?
>
> Is that too slow?
>
> for aKey, aValue in pairs( aTable ) do
>     anotherTable[ aKey ] = aValue
> end

Well, I haven't tested. :)

However, since there are sophisticated hashing and array-optimization
mechanisms behind Lua tables, I thought there can be some specialized
way to merge them, which would be faster than straight for loop of
key-value assignments. Am I wrong?

Alexander.