Why is Json parsing slower in multiple threads?
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Jun 21 09:57:59 UTC 2023
On Wednesday, 21 June 2023 at 00:35:42 UTC, Steven Schveighoffer
wrote:
> The D GC has a single global lock to allocate memory -- even
> memory that might be on a free list. So the threads are all
> bottlenecked on waiting their turn for the lock.
This would be something that's important enough to list on the
spec page for the GC: https://dlang.org/spec/garbage.html
It's only mentioned in passing here:
https://dlang.org/articles/d-array-article.html#caching
in the sentence "not to mention acquiring the global GC lock".
In theory the GC is replaceable but I think we should document
the behavior of the default one.
I'll submit an issue for it.
More information about the Digitalmars-d
mailing list