|
Basic Problem: disks are slow
- disk operation takes about 10 milliseconds
- memory operation takes about 50 nanoseconds
- disk is about 200000 times slower
- There are 3600 seconds per hour so it is like a 1 second
operation versus a 2 day operation
- Searching a linked list of 1000000 items takes less
than a second in RAM, but could take hours on disk.
- A binary tree on disk might take 20 disk accesses or
about 0.2 seconds -- still noticeable
- Different algorithms are necessary to achieve
acceptable speed
|