Re: add AVX2 support to simd.h

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: add AVX2 support to simd.h
Дата
Msg-id 20240325213754.GA3094030@nathanxps13
обсуждение исходный текст
Ответ на Re: add AVX2 support to simd.h  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: add AVX2 support to simd.h  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
Here is what I have staged for commit.  One notable difference in this
version of the patch is that I've changed

    +    if (nelem <= nelem_per_iteration)
    +        goto one_by_one;

to

    +    if (nelem < nelem_per_iteration)
    +        goto one_by_one;

I realized that there's no reason to jump to the one-by-one linear search
code when nelem == nelem_per_iteration, as the worst thing that will happen
is that we'll process all the elements twice if the value isn't present in
the array.  My benchmark that I've been using also shows a significant
speedup for this case with this change (on the order of 75%), which I
imagine might be due to a combination of branch prediction, caching, fewer
instructions, etc.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Melanie Plageman
Дата:
Сообщение: Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add bump memory context type and use it for tuplesorts