[plt-dev] Parallel Futures Release

From: James Swaine (james.swaine at gmail.com)
Date: Mon Dec 7 13:05:18 EST 2009

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.

I'm not sure whose decision it is to make futures enabled by default...is
this generally done by consensus?

-James

On Mon, Dec 7, 2009 at 11:43 AM, Jay McCarthy <jay.mccarthy at gmail.com>wrote:

> Would you like us to run some tests on many platforms and machines?
>
> What is the strategy for enabling it by default? (If it isn't ready,
> then what should we do to help? If it is, then let it rip!)
>
> Jay
>
> On Mon, Dec 7, 2009 at 10:31 AM, James Swaine <james.swaine at gmail.com>
> wrote:
> > I'm pleased to announce the initial release of parallel futures, a
> > construct for fine-grained parallelism in PLT. Roughly speaking, a
> > programmer passes a thunk to 'future' and it gets run in parallel.
> > That "roughly" holds a few gotchas, partly because we're just getting
> > started and partly due to the technique we're using. See the
> > documentation for more details:
> >
> >  http://pre.plt-scheme.org/docs/html/futures/
> >
> > If you've got a multicore machine where you can't keep the cores busy
> > or your office/machine room is a bit cold, try this program:
> >
> > #lang scheme
> > (require scheme/futures)
> > (define (loop) (loop))
> > (for-each
> >  touch
> >  (for/list ([i (in-range 0 (processor-count))])
> >   (future loop)))
> >
> > Note that you have to build mzscheme with futures; it isn't enabled by
> > default, but see the docs above for how to do that. Beyond the above,
> > we've also gotten a few parallel kernels going and are seeing good
> > scalability up to 8 cores (the biggest machine we have around for the
> > time being).
> >
> > Many thanks to Matthew, Robby, Kevin, and Peter Dinda, without whom this
> > release wouldn't have been possible.
> >
> > Feedback welcome!
> >
> > James
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-dev
> >
> >
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20091207/08775f3b/attachment.html>

Posted on the dev mailing list.