On Wednesday, 12 August 2015 at 23:06:32 UTC, Yuxuan Shui wrote:
What is wrong here?

I didn't look too closely, but there's some memory allocations going on there which have the potential of locking all the threads any time one of them tries to allocate.

Parallelism's benefits are largely erased by the memory allocator lock and can be set back by the cache being invalidated as it jumps around that allocated memory, so you generally want to make sure the threads are doing work on local variables only.

This restricts what you can do with strings, since most the std.string functions allocate new strings for their return values...

Reply via email to