How long computer operations take
The following table is from Peter Norvig’s essay Teach Yourself Programming in Ten Years. All times are in units of nanoseconds.
| execute typical instruction | 1 |
| fetch from L1 cache memory | 0.5 |
| branch misprediction | 5 |
| fetch from L2 cache memory | 7 |
| Mutex lock/unlock | 25 |
| fetch from main memory | 100 |
| send 2K bytes over 1Gbps network | 20,000 |
| read 1MB sequentially from memory | 250,000 |
| fetch from new disk location (seek) | 8,000,000 |
| read 1MB sequentially from disk | 20,000,000 |
| send packet US to Europe and back | 150,000,000 |