*These numbers are as of Dec. 27th, 2024
Storage
| Long Name | Unit | Storage Capacity |
|---|---|---|
| Bit | bit | 1 bit |
| Byte | byte | 8 bits |
| Kilobit | Kb | 1,000 bits |
| Kilobyte | KB | 8,000 bits |
| Megabit | Mb | 1,000,000 bits |
| Megabyte | MB | 8,000,000 bits |
| Gigabit | Gb | 1,000,000,000 bits |
| Gigabyte | GB | 8,000,000,000 bits |
| Terabit | Tb | 1,000,000,000,000 bits |
| Terabyte | TB | 8,000,000,000,000 bits |
Time
| Long Name | Unit | Duration |
|---|---|---|
| Second | s | 1 second |
| Millisecond | ms | 0.001 of a second |
| Microsecond | µs | 0.000001 of a second |
| Nanosecond | ns | 0.000000001 of a second |
For reference, a blink of an eye is on average between 300ms to 400ms, or less than half a second.
Data Access Benchmarks
A 1 GHz CPU has a speed of 1,000,000,000 clock cycles a second. Assuming that a simple instruction takes 1 clock cycle, we can conclude that a simple instruction takes about 1 nanosecond.
The below numbers should be taken with a huge grain of salt. The numbers depend on many factors such as the hardware itself, and the distance from the processor.
| Case | Latency | Ratio |
|---|---|---|
| A simple instruction on a 1GHz CPU | 1 nanosecond | 1 |
| Fetch data from L1 cache | About 1 nanosecond | 1 |
| Fetch data from L2 cache | 4 ns | 4 |
| Fetch data from L3 cache | 40 ns | 40 |
| Fetch data from main memory | 80 ns | 80 |
| I/O devices on the memory bus | 8 µs to 8 ms | 8,000x to 8,000,000x |
Cost
| Storage Type | Cost for 1 TB | Ratio |
|---|---|---|
| RAM | $4,000 – $8,000 | ~2000x |
| SSD | $170 | 56x |
| HDD | $19 | 6x |
| Tape | $3 | 1x |
Sources
http://norvig.com/21-days.html#answers