From: Sam Tobin-Hochstadt (samth at ccs.neu.edu) Date: Tue Mar 2 12:23:07 EST 2010 |
|
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 samth at ccs.neu.edu
Posted on the dev mailing list. |
|