Arc Forumnew | comments | leaders | submitlogin
1 point by rincewind 5935 days ago | link | parent

the lookup time in alists is O(n). What about proto-tables? Is the key hashed again for lookup in every prototype?


1 point by almkglor 5935 days ago | link

O(M) where M is the depth of the find, or the nested prototype depth if it's not found.

Yes, the key is rehashed.

But really, the point is that proto-tables are quite a bit easier to use: you still retain the table lookup syntax tb.key

-----