I’ve seen FloatVectorOperations use SIMD which is a good thing, but I was wondering about the best way to use them.
I have a big chunk of data to process and I want to find the maximum value in the fastest way possible
Should I call FloatVectorOperations::findMaximum with all the data
Should I divide my data in small chunks (which size has to be determined ??), create a thread pool, find the maximum for every chunk, and then find the maximum of all the “local” maximas ?
Obviously, the second solution sounds better as it uses multicore, but I was wondering what’s the best size for the data chunk ?
Should I create many threads with small chunks (*ideally the size of a floatvector but I have no idea of where to find that), or should I create as many threads as there are cores, with bigger chunks of data ?
What’s the best way to take advantage of the SIMD feature vs the cost of creating threads and finding the maximum of all the maximas ?