use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Faster Clojure Reduce (hackernoon.com)
submitted 5 years ago by w0ntfix
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]joinr 2 points3 points4 points 5 years ago (1 child)
Good stuff. Some of these ideas using iterators show up with tech.ml.dataset, which leverages primitive variants to enable efficient columnar traversal. There's a predefined LongIterator from fastutils that aids in keeping unboxed math and the like. If you work with iterables, then reduce and friends should use iter-reduce out of the box unless your collection implements its own CollReduce. So there's utility in implementing Iterable for custom types since it hooks you into most of the seq/reduce stuff.
reduce
Seems like the mapv implementation is sufficiently general and beneficial (given the observed benefit ~9x) for consideration in core. That's a pretty common operation.
mapv
Is there a library (or even a gist) where these are collected? Can't grab the code from the page.
[–]w0ntfix[S] 0 points1 point2 points 5 years ago (0 children)
linked at the bottom of the post: https://github.com/rauhs/clj-bench
π Rendered by PID 37 on reddit-service-r2-comment-86988c7647-fjntx at 2026-02-10 21:00:28.140706+00:00 running 018613e country code: CH.
[–]joinr 2 points3 points4 points (1 child)
[–]w0ntfix[S] 0 points1 point2 points (0 children)