Skip to content

Instantly share code, notes, and snippets.

@shaunhess
Created April 19, 2015 19:18
Show Gist options
  • Save shaunhess/72b6b4b3c5172f6f56d1 to your computer and use it in GitHub Desktop.
Save shaunhess/72b6b4b3c5172f6f56d1 to your computer and use it in GitHub Desktop.
Cache Performance Calculation
Cache is a net benefit in perf if time saved in cache hits exceeds time lost in cache overhead.
L = Regular lookup
H = Cache Hit
M = Cache Miss
R = Cache Hit Ratio (500 lookups/100 served from cache is 20%)
H x R + M x (1 - R) < L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment