mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
Merge branch 'topic/jazoff/speedup-for'
* topic/jazoff/speedup-for: problem: for loops over empty tables are slow. BIT-1878 #merged
This commit is contained in:
commit
895e7b06b1
3 changed files with 10 additions and 1 deletions
6
CHANGES
6
CHANGES
|
@ -1,4 +1,10 @@
|
||||||
|
|
||||||
|
2.5-368 | 2017-12-08 13:09:25 -0600
|
||||||
|
|
||||||
|
* Improve for-loop iteration performance over empty tables. (Justin Azoff)
|
||||||
|
|
||||||
|
* Fix gcc7 warnings. (Johanna Amann)
|
||||||
|
|
||||||
2.5-363 | 2017-12-05 11:00:09 -0600
|
2.5-363 | 2017-12-05 11:00:09 -0600
|
||||||
|
|
||||||
* Fix documentation for ReassemblerStats. (Corelight)
|
* Fix documentation for ReassemblerStats. (Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.5-363
|
2.5-368
|
||||||
|
|
|
@ -1293,6 +1293,9 @@ Val* ForStmt::DoExec(Frame* f, Val* v, stmt_flow_type& flow) const
|
||||||
TableVal* tv = v->AsTableVal();
|
TableVal* tv = v->AsTableVal();
|
||||||
const PDict(TableEntryVal)* loop_vals = tv->AsTable();
|
const PDict(TableEntryVal)* loop_vals = tv->AsTable();
|
||||||
|
|
||||||
|
if ( ! loop_vals->Length() )
|
||||||
|
return 0;
|
||||||
|
|
||||||
HashKey* k;
|
HashKey* k;
|
||||||
IterCookie* c = loop_vals->InitForIteration();
|
IterCookie* c = loop_vals->InitForIteration();
|
||||||
while ( loop_vals->NextEntry(k, c) )
|
while ( loop_vals->NextEntry(k, c) )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue