Skip to content

Instantly share code, notes, and snippets.

@miloops
Created October 13, 2010 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miloops/624299 to your computer and use it in GitHub Desktop.
Save miloops/624299 to your computer and use it in GitHub Desktop.
rails/master
| AR |
------------------------------------------------------------------
Model#id x100000 | 0.726 |
Model.new (instantiation) x10000 | 0.296 |
Model.new (setting attributes) x10000 | 0.718 |
Model.first x10000 | 3.346 |
Model.all limit(100) x1000 | 8.772 |
Model.all limit(100) with relationship x1000 | 20.349 |
Model.all limit(10,000) x10 | 7.463 |
Model.create x10000 | 33.781 |
Resource#attributes= x10000 | 0.904 |
Resource#update x10000 | 8.815 |
Resource#destroy x10000 | 25.991 |
Model.transaction x10000 | 2.413 |
Model.find(id) x10000 | 3.415 |
Model.find_by_sql x10000 | 1.655 |
Model.log x100000 | 1.406 |
AR.execute(query) x5000 | 0.737 |
==================================================================
Total | 120.788 |
identity_map using Weakling
| AR |
------------------------------------------------------------------
Model#id x100000 | 0.730 |
Model.new (instantiation) x10000 | 0.304 |
Model.new (setting attributes) x10000 | 0.740 |
Model.first x10000 | 3.832 |
Model.all limit(100) x1000 | 12.966 |
Model.all limit(100) with relationship x1000 | 21.660 |
Model.all limit(10,000) x10 | 11.808 |
Model.create x10000 | 30.433 |
Resource#attributes= x10000 | 0.863 |
Resource#update x10000 | 8.910 |
Resource#destroy x10000 | 23.823 |
Model.transaction x10000 | 2.252 |
Model.find(id) x10000 | 3.643 |
Model.find_by_sql x10000 | 1.679 |
Model.log x100000 | 1.486 |
AR.execute(query) x5000 | 0.766 |
==================================================================
Total | 125.896 |
identity_map using WeakHash
| AR |
------------------------------------------------------------------
Model#id x100000 | 0.726 |
Model.new (instantiation) x10000 | 0.302 |
Model.new (setting attributes) x10000 | 0.710 |
Model.first x10000 | 3.577 |
Model.all limit(100) x1000 | 10.107 |
Model.all limit(100) with relationship x1000 | 12.379 |
Model.all limit(10,000) x10 | 10.954 |
Model.create x10000 | 24.470 |
Resource#attributes= x10000 | 0.953 |
Resource#update x10000 | 11.222 |
Resource#destroy x10000 | 25.191 |
Model.transaction x10000 | 2.420 |
Model.find(id) x10000 | 3.995 |
Model.find_by_sql x10000 | 1.936 |
Model.log x100000 | 1.906 |
AR.execute(query) x5000 | 0.692 |
==================================================================
Total | 111.541 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment