r-windows / docs

Documentation for rtools40 and R for Windows
31 stars 10 forks source link

add to FAQ: status of OpenMP #25

Closed jpritikin closed 3 years ago

jpritikin commented 3 years ago

Does OpenMP work on Windows with gcc?

jeroen commented 3 years ago

It can compile, but it is very slow. If you are looking for speedup, it is not recommended, there is a lot of overhead on Windows. Enabling OpenMP can lead to a 5 or 10x slowdown of your programs instead of a speedup.

If you're looking for speedup, you are much better off using pthreads or c++11 threads.