Skip to content

Instantly share code, notes, and snippets.

@ashrithr
Last active December 24, 2015 22:49
Show Gist options
  • Save ashrithr/6875259 to your computer and use it in GitHub Desktop.
Save ashrithr/6875259 to your computer and use it in GitHub Desktop.
million inserts and lookups on ruby hash vs redis vs postgres

Time to generate 1 million hash entries:

  • Ruby hash = 3.5 secs
  • Redis = 91 secs
  • Postgres = 179 secs

Time to lookup 1 million entires in hash:

  • Ruby hash = 1.35 seconds
  • Redis = 71 secs
  • Postgres = 141 secs

benchmark done @: https://github.com/ashrithr/movie_data_gen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment