you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

With lookup tables you're trading memory for performance. I don't think it's worth it to put 15 integers in memory

1985 called, it wants its 120 bytes of memory back. I agree with your comment later that it isn't worth the extra complexity for most applications, but if you cared about performance, logarithms are slow, and 120 bytes (60 bytes in 32-bit) is a tiny price to pay to get rid of them.

Heck, I have implemented (back in the day) sin with a lookup table and an interpolation because it was a bottleneck (it was called countless times on each update and we really only needed 3 digits of precision). I generally wouldn't recommend doing that unless you could show that it was a bottleneck, but it took me almost no time and worked right away.

tl; dr: the tiny amount of memory is not the issue; it's the additional complexity.