| От | Greg Burd |
|---|---|
| Тема | Re: Add RISC-V Zbb popcount optimization |
| Дата | |
| Msg-id | ec81011b-c502-4702-b041-e4bdd2aa346f@app.fastmail.com обсуждение исходный текст |
| Ответ на | Re: Add RISC-V Zbb popcount optimization (John Naylor <johncnaylorls@gmail.com>) |
| Ответы |
Re: Add RISC-V Zbb popcount optimization
|
| Список | pgsql-hackers |
On Sat, Mar 21, 2026, at 10:14 PM, John Naylor wrote: > On Sat, Mar 21, 2026 at 11:56 PM Greg Burd <greg@burd.me> wrote: >> Attached is a small patch that enables hardware popcount on RISC-V when available and also sets the arch flag to 'rv64gc_zbb'flag when appropriate. > > I have to ask what the point is -- isn't that like putting a 4-inch > exhaust tip on a go-kart? Hey John, The point is to go fast, right? And to look cool (with awesome 4-inch exhaust tips) if possible! ;-P gburd@rv:~/ws/postgres$ gcc -O2 -o popcnt-wo-zbb riscv-popcnt.c gburd@rv:~/ws/postgres$ gcc -O2 -march=rv64gc_zbb -o popcnt-zbb riscv-popcnt.c gburd@rv:~/ws/postgres$ ./popcnt-wo-zbb && ./popcnt-zbb sw popcount: 0.196 sec ( 510.08 MB/s) hw popcount: 0.293 sec ( 341.48 MB/s) diff: 0.67x match: 406261900 bits counted sw popcount: 0.182 sec ( 548.86 MB/s) hw popcount: 0.044 sec ( 2279.89 MB/s) diff: 4.15x match: 406261900 bits counted But my first email/patch was incomplete/rushed, I should have followed the pattern used for similar ARM-specific logic. v2 attached along with a test program. > -- > John Naylor > Amazon Web Services best. -greg
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера