Re: New to D - playing with Thread and false Sharing

2015-08-21 Thread tony288 via Digitalmars-d-learn
On Friday, 21 August 2015 at 12:45:52 UTC, Kagamin wrote: On Thursday, 20 August 2015 at 15:31:13 UTC, tony288 wrote: So I wrong some code. But it seems the time to process a shared struct & shared long is always the same. Regardless of adding paddings. Should it be different? Hi all thank

Re: New to D - playing with Thread and false Sharing

2015-08-20 Thread tony288 via Digitalmars-d-learn
On Thursday, 20 August 2015 at 15:37:35 UTC, Dejan Lekic wrote: Keep in mind that in D everything is thread-local by default! :) For shared resources use __gshared or shared (although I do not know for sure whether shared works or not). Thanks, I changed the code and the previous one was alrea

New to D - playing with Thread and false Sharing

2015-08-20 Thread tony288 via Digitalmars-d-learn
Hi, I have been playing for a short time with D. I wanted to play with Thread, which I believe is lower level than concurrency and parallelism library (might be wrong here ?) . I was also learning and reading about false sharing - multiple thread => same cacheline. And I decided to play with