More threads -> Slower program ??

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 14 06:51:25 PDT 2015


On Wednesday, 12 August 2015 at 23:23:03 UTC, Yuxuan Shui wrote:
> Is there a way to do thread-local allocations?

Yes, either manually or just putting things on the stack, but the 
std.string functions you use doesn't try to do them.

You might try replacing format() with formattedWrite(), which 
calls a function you provide to put the data where it needs to be.

I tried running your program on my computer and it was too fast 
to measure so i'm not sure if this would make a difference or not.


More information about the Digitalmars-d-learn mailing list