ORM performance: is greenDAO faster than ORMLite? ORM performance: is greenDAO faster than ORMLite? sqlite sqlite

ORM performance: is greenDAO faster than ORMLite?


We've just published a Github project that we used to compare the performance of ORMLite and GreenDao to raw SQLite:
https://github.com/daj/android-orm-benchmark

The project also allows you to compare the performance of an in-memory database to an on disk one.

The headline results are:

GreenDao is much faster than ORMLite. It is roughly:

  • 3X faster at writing large numbers of objects.
  • 50% faster at reading in all 10000 entries in a single table.
  • 2X to 3X faster at an indexed read of a single row (though both were very fast).
  • 15X faster at doing a LIKE search for 100 records in a 10000 entry table.

The project contains both a naive raw SQLite benchmark, and an optimized SQLite benchmark.

GreenDao vs unoptimized raw SQLite

  • GreenDao is 2X faster for the write benchmark.
  • GreenDao is 25% slower for the read benchmark.

GreenDao vs optimized raw SQLite

  • GreenDao is 50% slower for the read and write benchmarks.

For detailed results please see the Github repository above.

Of course we may have bugs in our benchmarking code...if you find any please fork, fix and submit a pull request! :-)

Disclaimer: make sure you do your own research before choosing GreenDao over ORMLite.