Introduce Warm-up Phase for Dudect Measurement #289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A warm-up step was added to the measurement function to discard the first batch of data, inspired by a privately implemented earlier version that passed tests for queue-related functions. This follows the approach described in the Dudect paper, which skips initial measurements to improve timing stability., potentially mitigating factors like cache misses or allocation delays. Unlike the author's GitHub implementation, which dynamically checks the percentiles array state for each call, a static boolean is used here to mark the first execution within a single test run, as this suits the fixed iteration structure of the testing loop. Tests using queue insertion and removal functions showed no notable difference in constant-time behavior with or without this step after memory leaks were fixed, but it is retained for potential improvements in t-test precision under different test conditions.
Change-Id: Ieec138264fdd8d087142cdf3c3e9f961f521e80b