To satisfy my curiosity and to provide further info for anyone viewing list archives, I benchmarked assigning a new table() vs. running clear_table() on tables of various sizes & complexities.  Assigning a new table() was clearly the winner by a huge margin.

It should be noted that these two methods are not completely equivalent. I run a script where a current table is periodically moved to an old table, and the current table cleared for further use.  So, with A & B being tables of the same type:

B = A;
A = table();

works as intended, as B now contains the prior contents of A, and A is a new empty table.

B = A;
clear_table(A);

clears both, as they both point to the same table.

On Thu, Dec 6, 2018 at 4:17 PM Vern Paxson <vern@corelight.com> wrote:
> I believe the clear_table() function still exists in zeek, as well...

Hah^2!  Yeah, it does.  Well, glad I consulted the list before diving into
some hacking :-P.

                Vern