r/simd • • Oct 25 '24

AVX2 Optimization

Hi everyone,

I’m working on a project where I need to write a baseline program that takes more considerable time to run, and then optimize it using AVX2 intrinsics to achieve at least a 4x speedup. Since I'm new to SIMD programming, I'm reaching out for some guidance.Unfortunately, I'm using a Mac, so I have to rely on online compilers to compile my code for Intel machines. If anyone has suggestions for suitable baseline programs (ideally something complex enough to meet the time requirement), or any tips on getting started with AVX2, I would be incredibly grateful for your input!

Thanks in advance for your help!

10 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/Karyo_Ten Oct 27 '24

AVX2-specific, e.g. gathered loads.

Those were introduced with Skylake-X / AVX-512 iirc (but they now are supported on Intel 12XXX and later despite it not supporting AVX512)

2

u/SantaCruzDad Oct 27 '24

You might be thinking of scattered stores, which came with AVX-512, but gathered loads were introduced with AVX2. See e.g. https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#ig_expand=3704,3704&text=_mm_i32gather_epi32

1

u/Karyo_Ten Oct 27 '24

Ah possible