On Dec 8, 2012, at 8:16 PM, Marek Šrank wrote:
> 
> Yep, reducers, don't use lazy seqs. But they return just sth. like 
> transformed functions, that will be applied when building the collection. So 
> you can use them like this:
> 
>     (into [] (r/map burn (doall (range 4)))))
> 
> See 
> http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
> and http://clojure.com/blog/2012/05/15/anatomy-of-reducer.html for more 
> info...
> 

Thanks Marek. This does fix the "too quick to be true" issue, but alas, on my 
mac laptop (a 4 core intel i7):

57522.869 msecs for (time (into [] (r/map burn (doall (range 4)))))

58263.312 msecs for (time (doall (map burn (doall (range 4)))))

So while I'm not getting a terrible slowdown from using the reducers version of 
map, I'm also not getting any speedup over the single-thread map.

We should try this on our other architectures too, but it doesn't look 
promising.

 -Lee

--
Lee Spector, Professor of Computer Science
Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspec...@hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438

-- 
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

Reply via email to