Re:Cosine Implementation in C
by l33t233372 on Thursday March 30, 2023 @11:56PM
(#35382361)
This function is completely constant in running time, so I don’t think these considerations are important here.
[ Parent
| on HN ]
You can always have a smaller constant!
Re:Cosine Implementation in C
by l33t233372 on Friday March 31, 2023 @12:02AM
(#35382397)
You sure can, but if you can beat a single IEEE multiplication on an arbitrary processor my god that’s a program I hope to never ever in my life have to reverse engineer.
Re:Cosine Implementation in C
by dan_mctree on Friday March 31, 2023 @08:51AM
(#35386351)
Never quite got this argument. You can frequently do 1000 fold improvements or do even better by optimizing within the same algorithmic complexity. That frequently flips the bit of "is this software usable".
Sometimes you can even make real world performance significantly better by ignoring the technically better algorithmic complexity, especially when you almost always with low n's