Steve Underwood
11-20-2006, 05:35 PM
Eric de Castro Lopo has a very useful page at
http://mega-nerd.com/FPcast/ about fast float to integer conversion in
C. However, I just realised it doesn't tell the whole story, and I'm a
little puzzled.
When I do what that web page says, conversions are fast inlined
operations. That has been working fine for me for years. I've only just
realised, however, that when I put "-std=c99" on the compiler command
line, the inlined operations change to subroutine calls, and the speed
nosedives. Can anyone tell me why?
Steve
http://mega-nerd.com/FPcast/ about fast float to integer conversion in
C. However, I just realised it doesn't tell the whole story, and I'm a
little puzzled.
When I do what that web page says, conversions are fast inlined
operations. That has been working fine for me for years. I've only just
realised, however, that when I put "-std=c99" on the compiler command
line, the inlined operations change to subroutine calls, and the speed
nosedives. Can anyone tell me why?
Steve