Poor memory allocation performance with a lot of threads on 36 core machine

Yuxuan Shui via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 19 13:45:31 PST 2016


On Friday, 19 February 2016 at 08:29:00 UTC, Jonathan M Davis 
wrote:
> On Thursday, 18 February 2016 at 17:27:13 UTC, Chris Wright 
> wrote:
>> [...]
>
> Unfortunately, given how easy it is to cast between mutable, 
> const, immutable, shared (and it's quite common to construct 
> something as mutable and then cast it to immutable or shared) 
> and how it's pretty easy to pass objects across threads, it 
> becomes _very_ problematic to have a per-thread memory pool in 
> D, even if theoretically it's a great idea.

Can't we keep track of when this thing happens? We can have the 
compiler insert call to move data in/out of the per-thread pool 
when this kind of things happen.

>
> [...]
>
> - Jonathan M Davis



More information about the Digitalmars-d mailing list