No, lookup tables aren’t magic. The lookup table is part of the program and the execution time includes reading the program itself. A table of size 2^n takes O(2^n) to read into memory.
I don't know whether the log of the size of the table needed has a linear relationship to log(n) in this case.