diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-16 19:27:41 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-16 20:09:45 -0400 |
| commit | 626e8d0a9b4830438276947d0c76d1fbf4c7884c (patch) | |
| tree | 5cce0ff596a34a13e2c813c8a936eb693b56fcef /lib/command_py.c | |
| parent | 8872626bb4b8f5d9d06ea2b5e513e5ecb6a541aa (diff) | |
lib: A small optimization for the hash iterate and walk functions
When we are iterating through the hash, keep count of how many
we've called and if we have finished calling the hash->size
iterator times, then short-circuit and stop looping over
the entire array.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/command_py.c')
0 files changed, 0 insertions, 0 deletions
