Re:A not so fast implementation of cosine similarity in C++ ...
by magicalhippo on Tuesday October 15, 2024 @09:11PM
(#41854704)
> It can definitely break some things
I recall it totally fudged up the ray-axis aligned bounding box intersection routine in the raytracer I worked on. The routine relied on infinities being handled correctly, and -ffast-math broke that.
I see the linked article goes into that aspect in detail, wish I had it back then.
IIRC we ended up disabling it for just that file, as it did speed up the rest my a fair bit.
I recall it totally fudged up the ray-axis aligned bounding box intersection routine in the raytracer I worked on. The routine relied on infinities being handled correctly, and -ffast-math broke that.
I see the linked article goes into that aspect in detail, wish I had it back then.
IIRC we ended up disabling it for just that file, as it did speed up the rest my a fair bit.