partitioning - Using Partitioner with PLINQ in F# -


i use following plinq-implemented parallel map function.

let parmap f (xs:list<_>) = xs.asparallel().select(fun x -> f x) |> seq.tolist 

i want improve speedup on 4 cores i'm not able above 2. found 1 can custom partitioning improve parallel performance. have seen c# examples , not sure how work f#. following doesn't change think default partitioning used tpl? how can use different (static, dynamic,...) partitioning options here?

let pmap_plinqlst_parts f (xs:list<_>) =      let parts = partitioner.create(xs)     parts.asparallel().select(fun x -> f x) |> seq.tolist 

typically custom partitioner used if work units extremely small. when faced problem may better off switching task rather async more suited smaller more numerous amounts of work, async being more suited io type operations latency typically longer.

for example batch calculations in sequences amongst parallel threads. yield vary depending on size of work units , number of total items.

there no limit scaling in of methods mentioned. parallelised black scholes calculation , managed around 6.8x on 8 core machine using async.parallel. although not perfect mechanism used simple division of work amongst initial sequences passed async.parallel.

are sure have true 4 core machine or 2 core machine hyper threading?


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -