On Fri, 17 Sep 2010 14:09:59 +0200 Dariusz Mazur <[email protected]> wrote:
>[...] > Whats about CILK http://en.wikipedia.org/wiki/Cilk > > > |_function_ fib (n: integer):integer; > var > x,y : integer; > begin > > if (n< 2) then exit(n) > else begin > > x :=_spawn_ fib (n-1); > y := fib (n-2); > _sync_; > exit(x+y); > end; > end; > | Have you noticed that most examples for multi threading are either - easy to understand, but completely impractical (the above is an order of magnitude slower than single threaded) - OR practical, but hard to understand ? Note: afaik CILK is the same as parallel loops: It allows to make some special cases need less typing, can increase readability and can decrease overhead. As always with multithreading: wrongly used it can make code run much slower. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
