Andreas, et. al.
can you please advise on the goals/scenarios for using threading in Nim, ie when best to use it and when not to use it.
Currently, using parallel/spawn in loops to take advantage of multi-core CPUs is a lost cause, because it is way too slow compared to just doing a normal loop (but will this change in the future?)
Also, what are the long term goals?
filwit: I certainly can't answer those questions, but I'm not sure why you think parallel/spawn is slow.
The task creation overhead will generally dominate for short fragments of code. This is really unavoidable; modern processors are inherently limited in how fine-grained their parallelism can be and still be efficient.
That said, the parallel/spawn framework is very limited in that it can only handle a subset of interesting parallel algorithms well. This affects (among other things) anything involving a shared cache or other shared data structure, such as typical parallel implementations of A* or other search algorithms. In the long term, Nim definitely needs other frameworks or more general language features, too.