<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Sep 2, 2008 at 12:21 PM, Mats Cronqvist <span dir="ltr"><<a href="mailto:mats.cronqvist@gmail.com">mats.cronqvist@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Hynek Vychodil wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm not sure if it is good idea at all. If F function is very cheap and result or parameter is large (copy of it is more expensive in comparison to F expense) parallel version of pmap can be slower than serial version even many cores is used. Developer should be able control size of parallelized bunch and switch off parallel process fully. For example pmap(fun(X) -> [0|X] end, [lists:seq(1,1000000)]) is really bad idea and I will not be happy if lists:map will be changed to pmap automatically at default ;-)<br>
</blockquote></div>
regardless of how the OTP libs behaves, it will always be possible to find some case for which it performs badly. the question is what the *default* behavior should be.<br>
it seems obvious to me that the target for the OTP libs should be non-trivial calculations on multi-core machines. motivation;</blockquote><div><br>Lists module is component of stdlibs which is OTP library/aplication so I can't be agree with you. Lists is often used and lists should behave nice in normal usage. Change lists:map to anything other than current is bad. There are OTP libs which could not be performace beaters as gen_server, gen_fsm and other, but there are OTP libraries which should be. For example stlib! I guess you forgot that stdlib is OTP library too.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
* it's where the interesting stuff happens<br>
* it's difficult to get right<br>
<br>
if you want to run trivial calculations in parallel you can easily write your own code.<br><font color="#888888">
<br>
mats<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>--Hynek (Pichi) Vychodil<br>
</div>