News for hackers. Stuff that matters.
Re:Faster arithmetic by flipping signs by lawlessone on Friday May 10, 2019 @07:18AM (#19876738)
Does this work with GLSL?
Re:Faster arithmetic by flipping signs by Asooka on Friday May 10, 2019 @08:41AM (#19877151)
You'll need to examine the binary generated for a particular architecture by the driver. It may work on one driver+GPU combination, but be slower on another. Also, the semantics for floating-point math are somewhat looser in GLSL so the driver is given more power to reorder expressions and might exploit this trick on its own. As usual, you should profile and benchmark.