[Bro-Dev] "delete" of entire tables/sets
jmellander at lbl.gov
Tue Dec 18 11:29:17 PST 2018
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;
clears both, as they both point to the same table.
On Thu, Dec 6, 2018 at 4:17 PM Vern Paxson <vern at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bro-dev