Re: add AVX2 support to simd.h
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: John Naylor <johncnaylorls@gmail.com>
Cc: Ants Aasma <ants@cybertec.at>, pgsql-hackers@postgresql.org
Date: 2024-03-15T19:40:16Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve style of pg_lfind32().
- 7188a7806d20 17.0 landed
-
Fix compiler warning for pg_lfind32().
- 1f42337be535 17.0 landed
-
Micro-optimize pg_lfind32().
- 7644a7340c8a 17.0 landed
-
Introduce helper SIMD functions for small byte arrays
- 9f225e992bed 17.0 cited
-
Optimize xid/subxid searches in XidInMVCCSnapshot().
- 37a6e5df3713 16.0 cited
Attachments
On Fri, Mar 15, 2024 at 12:41:49PM -0500, Nathan Bossart wrote: > I've also attached the results of running this benchmark on my machine at > HEAD, after applying 0001, and after applying both 0001 and 0002. 0001 > appears to work pretty well. When there is a small "tail," it regresses a > small amount, but overall, it seems to improve more cases than it harms. > 0002 does regress searches on smaller arrays quite a bit, since it > postpones the SIMD optimizations until the arrays are longer. It might be > possible to mitigate by using 2 registers when the "tail" is long enough, > but I have yet to try that. The attached 0003 is a sketch of what such mitigation might look like. It appears to help with the regressions nicely. I omitted the benchmarking patch in v3 to appease cfbot. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com