Skip to content

Instantly share code, notes, and snippets.

@solnic
Created January 11, 2010 09:00
Show Gist options
  • Save solnic/274100 to your computer and use it in GitHub Desktop.
Save solnic/274100 to your computer and use it in GitHub Desktop.
Looks like we've got a broken IdentityMap but at least creates are 16x faster, lol :D
| MySQL Adapter | Mongo Adapter | DIFF |
-------------------------------------------------------------------------------------------
Model#id x100000 | 0.779 | 0.955 | 0.82x |
Model.get specific (not cached) x10000 | 8.739 | 18.586 | 0.47x |
Model.get specific (cached) x10000 | 0.205 | 18.169 | 0.01x |
Model.first x10000 | 6.838 | 15.949 | 0.43x |
Model.all limit(100) x100 | 1.311 | 6.807 | 0.19x |
Model.all limit(10,000) x10 | 11.479 | 77.404 | 0.15x |
Model.create x10000 | 275.205 | 16.761 | 16.42x |
Resource#attributes= x10000 | 1.155 | 1.123 | 1.03x |
Resource#update x10000 | 14.474 | 27.127 | 0.53x |
Resource#destroy x10000 | 275.949 | 33.337 | 8.28x |
===========================================================================================
Total | 596.134 | 216.219 | 2.83x |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment