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
Why Loser Tree is a good theoretical solution
How Go generics enable an efficient implementation
How profiling and benchmarks were used to tune the implementation and interface
How to apply this in practice, exemplified through Prometheus, Pyroscope, and Grafana Loki
Attendees of this talk will gain awareness of a new Open-Source package they could use and insight into the design of an interface using generics.
Смотрите видео GopherCon 2023: Bryan Boreham - Blazing Fast Merge with Loser Trees онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Gopher Academy 24 Март 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,386 раз и оно понравилось 48 людям.