C has many alternatives, but it is a low-level language. Intel Thread Building Blocks is a commercial parallel library based on Cilk that I hear well.
It depends on what you want to do for Python. Although you can get around the GIL using Cython, a pre-compiled version of Python, Cython slowly compiles and loses platform independence. In addition, Python is a scripting language, so you usually want to switch to a faster language before parallelizing. At the same time, using the multiprocessing module in Python (which allows you to bypass the GIL), you can write some simple parallel codes.
Java is probably the best choice. The synchronized , as well as decent primitives (such as a streaming non-blocking queue) make it relatively nice. Java is old, although you spend time writing more verbose code than Python.
I slowly learn parallelism in Haskell. It seems that this is not the easiest thing to get something effective, but if your task is quite parallel, then it works well. And, of course, Haskell is incredibly expressive (after you get to his syntactic mind - differently differently imho), and since it functions, you don't get strange corruption problems in the state; In the worst case, your code does not scale. There are many libraries, such as STM (Transactional Programming Memory), which seem to solve some problems much better (theoretically) than the primitives that real programmers use, such as locks.
gatoatigrado
source share