RFR: 6674: Optimize finding of first start time and first & last end times
Marcus Hirt
hirt at openjdk.java.net
Tue Jan 14 19:32:28 UTC 2020
On Tue, 14 Jan 2020 18:53:19 GMT, Henrik Dafgård <hdafgard at openjdk.org> wrote:
> This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively.
>
> This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods.
Careful here. They are not sorted on start and end time both, and events are not guaranteed (except that we recommend that this is the case for the events of a particular event type, if at all possible) to be non-overlapping.
-------------
PR: https://git.openjdk.java.net/jmc/pull/31
More information about the jmc-dev
mailing list