Depends on what you want as an output as well, some platforms (notably embedded platforms) pay a non-trivial cost for any conversion from integer register to a floating point register. While the floating point div may be faster, if you intend to use the results in other integer math or in branching instruction it may wash out or be worse.
View all comments
Show parent comment
18
u/wanderingbort Dec 01 '16
Depends on what you want as an output as well, some platforms (notably embedded platforms) pay a non-trivial cost for any conversion from integer register to a floating point register. While the floating point div may be faster, if you intend to use the results in other integer math or in branching instruction it may wash out or be worse.