Benefits of a Lookup Table

This tip submitted by Ali Nawkhas Murad on 2012-02-04 06:36:42. It has been viewed 5770 times.
Rating of 4.3 with 15 votes

The lookup table becomes very important tool when the time is more critical than memory space in your system. In this case a function with tedious and long calculations, consuming too much time can be replaced by a lookup table. A lookup table takes an argument as an index to table to get its corresponding value. For example the factorial function can be substituted by lookup table as shown below: