<html><body bgcolor="#FFFFFF"><div>You're confusing the issues. Green threads is orthogonal to the performance of CPU bound computations. As a matter of fact, erl spawns a thread for each CPU and extra for certain blocking io operations.</div><div><br class="webkit-block-placeholder"></div><div>I'd be more worried about the bytecode and lack of compact data structures.</div><div><br class="webkit-block-placeholder"></div><div>Of course, this is all wild speculation. Why not do some tests?<br><br><div>-ryan</div><div><br class="webkit-block-placeholder"></div>Sent from my iPhone</div><div><br>On Aug 26, 2007, at 1:03 PM, shahzad bhatti <<a href="mailto:bhatti_shahzad@yahoo.com">bhatti_shahzad@yahoo.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div>I am looking at Erlang lately and like the support for distributed and concurrent applications. However, I have a question regarding kind of applications that Erlang is best suited for. Since, Erlang uses green threads for user processes (though it has SMP support), I am not sure if it is well suited for CPU intensive applications as opposd to I/O bound applications. For example, I have a system that calculates shortest path for a very large network and I would like to use distributed Erlang to divide the problem (using Google like map-reduce) and create a number of processes per node to calculate the shortest path for smaller network. From prior experience, I have found that for CPU bound applications work best when the number of threads is roughly equal to number of cores/CPUs, and I am concerned about excessive context switching and cache misses. Can someone share their Erlang experience with CPU bound problems. </div><br><br>Regards,<br>Shahzad
 Bhatti<br>Email: <a href="mailto:bhatti@plexobject.com"><a href="mailto:bhatti@plexobject.com">bhatti@plexobject.com</a></a><br>YIM: <a href="mailto:bhatti_shahzad@yahoo.com"><a href="mailto:bhatti_shahzad@yahoo.com">bhatti_shahzad@yahoo.com</a></a><br>URL: <a href="http://bhatti.plexobject.com"><a href="http://bhatti.plexobject.com">http://bhatti.plexobject.com</a></a><br>Blog: <a href="http://weblog.plexobject.com"><a href="http://weblog.plexobject.com">http://weblog.plexobject.com</a></a><br>Company: <a href="http://www.plexobject.com"><a href="http://www.plexobject.com">http://www.plexobject.com</a></a><p> 
      </p><hr size="1">Moody friends. Drama queens. Your life? Nope! - their life, your story.<br> <a href="http://us.rd.yahoo.com/evt=48224/*http://sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </a></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></span><br><span><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a></span></div></blockquote></body></html>