[ctf] Fix binary search for a long sequence of same timestamps.
The binary search algorithm does not need a third case
(when values are equals) if there is a guarantee to remove
one element in the search space at each iteration.
The actual binary search implementation performs a sequential
search on elements with the same timestamp (to find the first
one).
The ETW2CTF traces produce many debug events for the debugging
information at the module load timestamp. Which is the worse
case for the actual implementation.
We changed the algorithm to use the timestamp end of a packet
instead of the beginning. We changed the way to choose a
middle element to ease the recursion by using only two cases.
Change-Id: I4f16d43b9533f8f1449cdb3c4c213bcb9f962daf
Signed-off-by: Etienne Bergeron <etienne.bergeron@gmail.com>
Reviewed-on: https://git.eclipse.org/r/18654
Reviewed-by: Matthias Nick <Matthias.Nick@bsiag.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tested-by: Hudson CI
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
This page took 0.034116 seconds and 5 git commands to generate.