| ▲ | Tuna-Fish 2 hours ago | |||||||
FP Division by constant is optimized by a compiler into a multiply. Graphics processing typically happens on the GPU these days, and on all recent GPUs FPMUL belongs to the class of lowest-latency operations. That is, there are no other instructions that complete faster. | ||||||||
| ▲ | pixelesque an hour ago | parent | next [-] | |||||||
Only with things like -ffast-math enabled will compilers do the reciprocal. It can make a fair difference in some cases, but it's often better to selectively use it in code locations you know are acceptable by doing it manually in the code. | ||||||||
| ▲ | mgaunard an hour ago | parent | prev [-] | |||||||
That's only valid to do if the reciprocal is representable exactly. | ||||||||
| ||||||||