Generic theory question.
I'm trying to build a library from source (FFTW if anyone cares, but it really doesn't matter), and I noticed there is an option to disable the use of alloca
.
I'm aware of the dangers of using alloca
, but I'm assessing the performance of FFTW with and without alloca
.
Does alloca
have known issues with thread safety? I'm seeing an extreme performance hit when I use a certain number of threads with FFTW (which is obviously calling alloca
in the background). I'm sticking to using a number of threads equal to powers of 2, if that matters.
Is it possible that FFTW is sharing objects on a thread-local stack via alloca
? I'm just trying to figure out why I see such extreme performance hits with certain numbers of threads. However, I don't fully understand the theory behind what alloca
is really doing w/ threads.