Skip to main content

New answers tagged

Best practices
0 votes
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

Indeed, I spoke to another programmer who tackled a very similar problem (if you are curious, I am working on re-creating a simulation not unlike Minecraft's redstone, only at very high speeds), and ...
lzg's user avatar
  • 123
Best practices
0 votes
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

You're right, and this is probably the best idea when tackling a problem such as this, as I won't have to think about the other aspects of the program coming into play. I'm taking a small break from ...
lzg's user avatar
  • 123
Best practices
0 votes
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

Thanks for the suggestion. In the meantime I did just that, but I also noticed there is other shared memory which could be invalidating cache lines. I had (mistakenly) thought that adding spinlocks to ...
lzg's user avatar
  • 123
Best practices
0 votes
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

Every time I start a parallel pass, the last pass must have completed its execution. As such, when I start sending to threads, I know that they will never be busy. The array I split is uniform in that ...
lzg's user avatar
  • 123
Best practices
0 votes
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

This is what I was going to say. It may still be possible to speed up very large simulation instances with multithreading, but the timeslice interval on most modern OSes is order of 1 millisecond, ...
zwol's user avatar
  • 143k
Best practices
1 vote
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

If you have jobs[0] and jobs[1] on the same cache line (64 bytes on x86-64 platforms), then false sharing may be an issue. You may want to ensure that each element of the jobs array is on its own ...
Andreas Wenzel's user avatar
Best practices
1 vote
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

It may be helpful if you could provide a minimal reproducible example of the problem, which includes a function main and all #include directives, as well as the exact input required to reproduce the ...
Andreas Wenzel's user avatar
Best practices
1 vote
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

Thanks for the answer. I'm not quite sure of the benefit of workers "pulling", since I'd still have to choose a chunk length per-job (I immediately know the total work length before ...
lzg's user avatar
  • 123
Best practices
2 votes
0 replies
0 views

How to signal a multithreaded worker pool at very high throughput?

Good question. I avoid atomics, so I might not be the best person to comment on this, but it seems that the amount of computational work you're doing in a single step is insufficient for performance ...
Simon Goater's user avatar
  • 2,067
0 votes

What is the difference between SynchronizationContext.Send and SynchronizationContext.Post?

but I can't explain why it uses SynchronizationContext.Send from the thread-pool and Synchronization.Post from the Func passed into the method that does the heavy lifting 1). using callback, as your ...
JeeyCi's user avatar
  • 652

Top 50 recent answers are included