Commit Graph

2 Commits (50c233b58c68b9efd5242cc2b0d72ae5ab16e798)

Author SHA1 Message Date
Mike Lang 50c233b58c fix copy paste error in v3/v4 and benchmark duplicate merges
Merging 1000 duplicates of the same batch:
v1: 98ms
v2: 101ms
v3: 116ms
v4: 116ms

So as expected v3 and v4 have a small cost with duplicates for optimizing for non-overlapping,
but even with ridiculous numbers duplicates are fast to process anyway.
1 month ago
Mike Lang eeeb48c0f8 add third implementation
which is really just the second implementation but generalized to N-way merge instead of 2-way.

Basic benchmark results:
                         v1   v2   v3
    1 hour (60 batches): 19ms 31ms 23ms
24 hours (1440 batches): 34s  130s 17s

So it's about as fast as v1 when it doesn't matter, and twice as fast when it does.
1 month ago