Is foreach parallel “faster” or does it make any difference in the runtime in comparison to Foreach primitive?
I have seen examples in unity, I understand barely the concept when it seems that in an engine as such some users prefer it for heavy procedures, but what about vvvv?
What are the cases where I would need Foreach (parallel) ?
First of all you can only use it if all the iterations can run concurrently. That means that any state/resource they access concurrently needs to be protected / thread safe. Immutable types (primitives, records, immutable collections of such) or special concurrent collections are your friend here. Also the Lock region should be worth mentioning.
You also need to be sure that nothing you access inside the loop assumes it’s running on the main thread - that is usually true for UI or render code (Stride, Skia, etc.).
But let’s say you have all these things sorted out, if it really is faster depends on the workload happening in each iteration. If the individual workloads are big enough, you should see a speedup up to the amount of CPUs you have.