Ah, that would make sense. Thanks. 2009/10/14 gerryxiao <gerryx...@gmail.com>
> > Garth, > Par branch is based openjdk 7 fork/jion lib which is not finished yet, > > It will be merged after openjdk7 has been released, i think > > Regards, > > gerry > > On 10月14日, 下午6时06分, Garth Sheldon-Coulson <g...@mit.edu> wrote: > > Hi Rich, > > > > I've started using pvmap for some intensive vector operations and it's > > terrific. For small operations over large vectors I'm seeing a sizable > > speedup even on my piddly dual-core. > > > > It looks like the par branch is a ways behind master. What's the timeline > > for merging it in? Are you waiting till you have a whole suite of > > forkjoin-based functions? > > > > I'd like to be able to use pvmap in my code and count on others' > > master-based JARs to have it. > > > > Garth > > > > On Sat, Aug 1, 2009 at 9:15 AM, Rich Hickey <richhic...@gmail.com> > wrote: > > > > > On Fri, Jul 31, 2009 at 10:40 AM, Eric<ericwnorm...@gmail.com> wrote: > > > > > > I tried to import clojure.parallel today and it didn't work. It > > > > couldn't find forkjoin.ParallelArray > > > > > > So I went hunting for it and it doesn't exist. There is a > > > > extra166y.ParallelArray. In fact, all of the names imported were in > > > > extra166y. So I changed the line in parallel to reflect that. > > > > > > (import '(jsr166y.forkjoin ParallelArray ParallelArrayWithBounds > > > > ParallelArrayWithFilter > > > > ParallelArrayWithMapping > > > > Ops$Op Ops$BinaryOp Ops$Reducer Ops > > > > $Predicate Ops$BinaryPredicate > > > > Ops$IntAndObjectPredicate Ops > > > > $IntAndObjectToObject)) > > > > > > changed to > > > > > > (import '(extra166y ParallelArray ParallelArrayWithBounds > > > > ParallelArrayWithFilter > > > > ParallelArrayWithMapping > > > > Ops$Op Ops$BinaryOp Ops$Reducer Ops > > > > $Predicate Ops$BinaryPredicate > > > > Ops$IntAndObjectPredicate Ops > > > > $IntAndObjectToObject)) > > > > > > This seems to fix it. > > > > > You are right, ParallelArray has moved, but more important, isn't > > > going to make it into Java 7. Due to that, and some prodding to look > > > at the latest ForkJoin, I've started work on implementing parallel > > > algorithms right on the Clojure persistent data structures using the > > > lower-lever ForkJoin primitives. > > > > > The work is in the 'par' branch on GitHub: > > > > >http://github.com/richhickey/clojure/tree/par > > > > > You'll need the jsr166y.jar I have built, placed in the same directory > > > as build.xml: > > > > >http://cloud.github.com/downloads/richhickey/clojure/jsr166y.jar > > > > > And be building and running with Java 6. > > > > > Right now there is just pvmap and pvreduce, both in the clojure.par > > > namespace. Both take (Clojure) vectors, and, unlike pmap, are quite > > > fast even for relatively small operations, i.e. (pvmap inc v) should > > > be faster than (map inc v) for large vectors on multicore machines. > > > The nice thing is pvmap returns a Clojure vector, so no need for the > > > special data structures as with the older parallel library. > > > > > The results are quite promising, and I look forward to implementing > > > many parallel operations on Clojure's vectors and maps, and providing > > > the tools for you to write your own. > > > > > Feedback welcome, > > > > > Rich > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---