www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Better multithreading with D

reply solidstate1991 <laszloszeremi outlook.com> writes:
In order to call a function multiple time at parallel (rendering 
function, very well parallelizable), but in order to push the CPU 
to it's limits I have to get some form of parallelization. 
Currently I'm using parallel foreach, which isn't very nice, and 
since it uses GC allocation that creates some performance impact 
from time to time.
Apr 20 2018
parent 12345swordy <alexanderheistermann gmail.com> writes:
On Saturday, 21 April 2018 at 02:08:24 UTC, solidstate1991 wrote:
 In order to call a function multiple time at parallel 
 (rendering function, very well parallelizable), but in order to 
 push the CPU to it's limits I have to get some form of 
 parallelization. Currently I'm using parallel foreach, which 
 isn't very nice, and since it uses GC allocation that creates 
 some performance impact from time to time.
Did you attempt to create a memory pool with the GC? Any memory allocation will take time, whatever it's CG or manual.
Apr 20 2018