Faster `&&` intersection for sorted arrays

Поиск
Список
Период
Сортировка
От Adrian Garcia Badaracco
Тема Faster `&&` intersection for sorted arrays
Дата
Msg-id CAE8z92HXNko026zBe++fXr7_1tDCfFEJyiuUEmppYvUD253U8A@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
I was wondering if I could do better than `&&` for sorted arrays by doing binary search and came up with some really interesting results.
I only did a quick spin of this, an LLM generated most of the code after I gave it the algorithm and I don't plan on using it in production (I'm going to normalize my schema instead) but I wanted to share this in case it's useful to anyone.

https://gist.github.com/adriangb/1b68bb2e408423ddcb90fb0136a00ba8

В списке pgsql-general по дате отправления: