Comparing Linear and Lookup Search
- Lookup is faster at searching than linear.
- What are the downsides to lookup?
- It takes a lot of storage. How big would the lookup table
for 10 character words be? 256^10 = 2^80 ~= an octillion or a
million trillion gigabytes.
- It also takes time to build the lookup table.
- It's also more complex to program (as you have to build the
table).
- A hashing function can be used to make it more reasonably sized,
but that's called a hash table and is in a more advanced course.