Performance of tables slower than built in?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu May 23 18:57:03 UTC 2019


On Wednesday, 22 May 2019 at 00:22:09 UTC, JS wrote:
> I am trying to create some fast sin, sinc, and exponential 
> routines to speed up some code by using tables... but it seems 
> it's slower than the function itself?!?

Not when I tried it with one of the online compilers, LUT is 3-4 
times faster on your tight inner loop, but I guess it depends on 
the CPU.

LUT should be very fast in long-running tight inner loops like 
that once the cache is warm with such as small LUT that fits in 
working memory (cache).




More information about the Digitalmars-d-learn mailing list