On Sat, Jul 25, 2009 at 4:40 PM, atucker wrote:
>
> I wonder if any of the Clojurians on here might like to describe how
> one might write the factorial function as a parallel one? Taking
> advantage of the associativity of multiplication, along the lines of
>
> 16! = (((1*2)*(3*4)) * ((5*6)*(7*
Hello,
> I wonder if any of the Clojurians on here might like to describe how
> one might write the factorial function as a parallel one?
Look at the files section of this group, I wrote 2 examples of
parallel factorial and the sources are uploaded there...
Kind regards,
Vlad
--~--~--
The parallel library wraps the ForkJoin library scheduled for
inclusion in JDK 7:
http://gee.cs.oswego.edu/dl/concurrency-interest/index.html
You'll need jsr166y.jar in your classpath in order to use this
library.
(use '(clojure.parallel))
(clojure.parallel/preduce * (range 2 16))
On Jul 26, 6:40
I wonder if any of the Clojurians on here might like to describe how
one might write the factorial function as a parallel one? Taking
advantage of the associativity of multiplication, along the lines of
16! = (((1*2)*(3*4)) * ((5*6)*(7*8))) * (((9*10)*(11*12)) * ((13*14)*
(15*16)))
On Jul 24, 8
Jeremy,
On Jul 24, 1:20 pm, Jeremy Gailor wrote:
> I'm just looking for general optimizations that I should be aware of, the
> nature of the function itself isn't really important. I could turn to
> number theory to get some performance improvement, but from a Clojure
> oriented perspective, wh
I'm pretty familiar with scheme programming, so functional programming isn't
new to me, but I rarely turn to it for solving problems during my day to day
work. In learning Clojure, I've been going through problems on project
euler, and one question I have is that while it's straigh-forward to
impl