Speed up ChunkCount validity check

When counting chunks for the purpose of a Valid check, only count up to
chunk_count_limit + 1 chunks.  This speeds up the skipping of the 70,000
chunk test file considerably.

Before:
    Processed 1 inputs in 0.025517s

After:
    Processed 1 inputs in 0.000620s
This commit is contained in:
Justin Azoff 2020-05-21 12:55:00 -04:00
parent 7d98d816d8
commit 6aa6eea7bc
2 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ public:
/**
* @return the number of chunks in the fuzz buffer object
*/
int ChunkCount() const;
int ChunkCount(int chunk_count_limit = 0) const;
/**
* @return the next chunk to deliver, if one could be extracted