Рет қаралды 1,386
Both sorting and merging efficiently can be hard problems. Merging ordered sequences is a little bit easier, but still hard. Thankfully many hard problems in computer science have been well-studied. A good strategy for k-way merging is called Tournament Tree, or Loser Tree. Go didn’t have an implementation of that, so I made one.
In this talk, we will look at
Fundamentals and problems of k-way merges
How Go generics enable an efficient implementation
How profiling and benchmarks were used to tune the implementation and interface