3 ms·
Arrays are usually causing problems in the parallelism world, if you're trying to modify them anyway. The standard paradigm is the actor model, you reduce your
by gauravk92 15y ago
Arrays are usually causing problems in the parallelism world, if you're trying to modify them anyway. The standard paradigm is the actor model, you reduce your program to never actually talk to data, only act as if it were. The objects asynchronously handle messages to modify themselves, thus a message can come from anywhere.
That's one solution but the biggest hurdle most parallel codes faces is the fact that most programmers think sequentially. When you start thinking parallel, it doesn't make as much sense, and the thought degrades to a magic box that you throw work at. IMHO usually because where parallelism is an intuitive concept, the API's to take advantage of it usually suck.
- sausagefeet 15y agoYou wouldn't have array mutation in this case, since that isn't a very parallelizable operation. My question is if we could construct a usable language where every operator in it is a parallel operator, in which point the optimizing compiler is trying to find situations where it can just treat values as sequential code, not finding situations where it can treat sequential code as parallelizable.