I think one reason that we don't have it enabled in the build by default is that having it enabled adds some performance overhead, even if you aren't using futures in your program. With futures enabled, the JIT compiler doesn't emit direct calls to unsafe primitives but instead emits calls to wrapper functions. These wrappers basically exist to check whether we're attempting to invoke function X on the right thread, and if not, signal the runtime and block. So for every primitive invocation in a program, with futures enabled, this essentially becomes two function invocations. This hurts you more on some platforms than others, IIRC. <br>
<br>I'm not sure whose decision it is to make futures enabled by default...is this generally done by consensus?<br><br>-James<br><br><div class="gmail_quote">On Mon, Dec 7, 2009 at 11:43 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@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;">Would you like us to run some tests on many platforms and machines?<br>
<br>
What is the strategy for enabling it by default? (If it isn't ready,<br>
then what should we do to help? If it is, then let it rip!)<br>
<br>
Jay<br>
<div><div></div><div class="h5"><br>
On Mon, Dec 7, 2009 at 10:31 AM, James Swaine <<a href="mailto:james.swaine@gmail.com">james.swaine@gmail.com</a>> wrote:<br>
> I'm pleased to announce the initial release of parallel futures, a<br>
> construct for fine-grained parallelism in PLT. Roughly speaking, a<br>
> programmer passes a thunk to 'future' and it gets run in parallel.<br>
> That "roughly" holds a few gotchas, partly because we're just getting<br>
> started and partly due to the technique we're using. See the<br>
> documentation for more details:<br>
><br>
> <a href="http://pre.plt-scheme.org/docs/html/futures/" target="_blank">http://pre.plt-scheme.org/docs/html/futures/</a><br>
><br>
> If you've got a multicore machine where you can't keep the cores busy<br>
> or your office/machine room is a bit cold, try this program:<br>
><br>
> #lang scheme<br>
> (require scheme/futures)<br>
> (define (loop) (loop))<br>
> (for-each<br>
> touch<br>
> (for/list ([i (in-range 0 (processor-count))])<br>
> (future loop)))<br>
><br>
> Note that you have to build mzscheme with futures; it isn't enabled by<br>
> default, but see the docs above for how to do that. Beyond the above,<br>
> we've also gotten a few parallel kernels going and are seeing good<br>
> scalability up to 8 cores (the biggest machine we have around for the<br>
> time being).<br>
><br>
> Many thanks to Matthew, Robby, Kevin, and Peter Dinda, without whom this<br>
> release wouldn't have been possible.<br>
><br>
> Feedback welcome!<br>
><br>
> James<br>
</div></div>> _________________________________________________<br>
> For list-related administrative tasks:<br>
> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-dev" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-dev</a><br>
><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://teammccarthy.org/jay" target="_blank">http://teammccarthy.org/jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</font></blockquote></div><br>