Since futures are now on by default, I thought I'd try them out (on a
silly microbenchmark).  For the Spectral Norm benchmark
(collects/tests/mzscheme/benchmarks/shootout/spectranorm-unsafe.ss)
just using this simple macro:

(define-syntax-rule (for/par b . body)
  (let ([futs (for/list b (future (lambda () . body)))])
    (for ([f (in-list futs)]) (touch f))))

in two places resulted in a 60% speedup on my 4 core machine.  Very impressive.
-- 
sam th
[email protected]
_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to