Preprocessing and Data Structures
- Preprocessing can make things a lot more efficient.
- You trade off start time, with run time.
- That's what happens when you build a lookup table.
- This has larger benefits the longer your program runs.
Programs run longer in the modern world. For example,
on-line databases are on for months at a time.
- The lookup table is also an example of a data structure (as is
the array of records).
- More complex data structures lead to more efficient and
maintainable programs.
- As you become better programmers, you will learn more about
more data structures.
- I still find out about new ones occasionally, but I mostly
use the standard ones as bulding blocks for the ones I need.
- Note that a class almost always contains a data structure (a
record).