I’ve been experimenting with MongoDB’s map-reduce, called from Ruby, as a replacement for Ruby’s Enumerable methods (map/collect, inject). It’s faster. Much faster.
Next, the details but first – the disclaimers:
- My database is not optimised (using, e.g. indices)
- My non-map/reduce code is not optimised; I’m sure there are better ways to perform database queries and use Enumerable than those in this post
- My map/reduce code is not optimised – these are my first attempts
In short nothing is optimised, my code is probably awful and I’m making it up as I go along. Here we go then!
Read the rest…


