{"id":23643503,"url":"https://github.com/skrevolve/latency-numbers-every-programmer-should-know","last_synced_at":"2026-01-25T11:02:21.726Z","repository":{"id":222506458,"uuid":"757481413","full_name":"skrevolve/Latency-numbers-every-programmer-should-know","owner":"skrevolve","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-14T15:34:25.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T14:52:16.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skrevolve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-14T15:29:55.000Z","updated_at":"2024-02-14T15:29:56.000Z","dependencies_parsed_at":"2024-02-14T16:50:41.174Z","dependency_job_id":null,"html_url":"https://github.com/skrevolve/Latency-numbers-every-programmer-should-know","commit_stats":null,"previous_names":["skrevolve/latency-numbers-every-programmer-should-know"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skrevolve/Latency-numbers-every-programmer-should-know","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrevolve%2FLatency-numbers-every-programmer-should-know","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrevolve%2FLatency-numbers-every-programmer-should-know/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrevolve%2FLatency-numbers-every-programmer-should-know/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrevolve%2FLatency-numbers-every-programmer-should-know/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skrevolve","download_url":"https://codeload.github.com/skrevolve/Latency-numbers-every-programmer-should-know/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skrevolve%2FLatency-numbers-every-programmer-should-know/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-28T11:19:37.979Z","updated_at":"2026-01-25T11:02:21.665Z","avatar_url":"https://github.com/skrevolve.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"https://gist.github.com/jboner/2841832\n\n### Latency numbers every programmer should know\n    L1 cache reference ......................... 0.5 ns\n    Branch mispredict ............................ 5 ns\n    L2 cache reference ........................... 7 ns\n    Mutex lock/unlock ........................... 25 ns\n    Main memory reference ...................... 100 ns             \n    Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs\n    Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs\n    SSD random read ........................ 150,000 ns  = 150 µs\n    Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs\n    Round trip within same datacenter ...... 500,000 ns  = 0.5 ms\n    Read 1 MB sequentially from SSD* ..... 1,000,000 ns  =   1 ms\n    Disk seek ........................... 10,000,000 ns  =  10 ms\n    Read 1 MB sequentially from disk .... 20,000,000 ns  =  20 ms\n    Send packet CA-\u003eNetherlands-\u003eCA .... 150,000,000 ns  = 150 ms\n\nAssuming ~1GB/sec SSD\n\n![Visual representation of latencies](http://i.imgur.com/k0t1e.png)\n\nVisual chart provided by [ayshen](https://gist.github.com/ayshen)\n\nData by [Jeff Dean](http://research.google.com/people/jeff/)\n\nOriginally by [Peter Norvig](http://norvig.com/21-days.html#answers)\n\n### Lets multiply all these durations by a billion:\n\nMagnitudes:\n\n### Minute:\n    L1 cache reference                  0.5 s         One heart beat (0.5 s)\n    Branch mispredict                   5 s           Yawn\n    L2 cache reference                  7 s           Long yawn\n    Mutex lock/unlock                   25 s          Making a coffee\n\n### Hour:\n    Main memory reference               100 s         Brushing your teeth\n    Compress 1K bytes with Zippy        50 min        One episode of a TV show (including ad breaks)\n\n### Day:\n    Send 2K bytes over 1 Gbps network   5.5 hr        From lunch to end of work day\n\n### Week\n    SSD random read                     1.7 days      A normal weekend\n    Read 1 MB sequentially from memory  2.9 days      A long weekend\n    Round trip within same datacenter   5.8 days      A medium vacation\n    Read 1 MB sequentially from SSD    11.6 days      Waiting for almost 2 weeks for a delivery\n\n### Year\n    Disk seek                           16.5 weeks    A semester in university\n    Read 1 MB sequentially from disk    7.8 months    Almost producing a new human being\n    The above 2 together                1 year\n\n### Decade\n    Send packet CA-\u003eNetherlands-\u003eCA     4.8 years     Average time it takes to complete a bachelor's degree\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskrevolve%2Flatency-numbers-every-programmer-should-know","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskrevolve%2Flatency-numbers-every-programmer-should-know","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskrevolve%2Flatency-numbers-every-programmer-should-know/lists"}