Benchmark various MongoDB ORM for Ruby

Posted in : ruby, mongo_mapper, mongoid, and benchmark

Inspired by a benchmark of MongoDB versus SQLite by Jeremy Evans, the famous author of Sequel, here is a benchmark of MongoDB via the mongo ruby driver versus Sqlite via Sequel:

Mongo versus Sqlite

The faster “select alls” can be easily explained: SQLite ids are simple integers whereas mongo ids look like this:


So there’re simply more data the gather each time. Sqlite is quite fast in fact, but don’t forget that it offers neither concurrency nor scalability.

More interesting is the following chart featuring MongoMapper versus Mongoid versus plain mongo ruby driver:

MongoMapper versus Mongoid

And here’s more ODM bench:

MongoModel versus Candy versus MongoRecord versus MongoDoc

The source for all these benchmarks is freely available on github.

blog comments powered by Disqus