>I have recently written a paper titled "Faster Floating Point to Integer Conve >rsions" >which can be read here: > > http://mega-nerd.com/FPcast/
nice work. but i have a question: your timings how that lrintf and lrint basically take nearly twice as long as the optimal asm macro. if you're writing a program in which float<->int conversion is a significant issue, why would you move from the cast solution (which is obviously bad) to one thats only half as good as it could be? many other platforms (e.g. MIPS) do float<->int phenomenally well just via a cast. it seems to me that it would be "cleverer" to define a portable solution, if you're going to be willing to use autoconf, that defines FLOAT_TO_INT, but make it platform specific and possibly a no-op if the platform's cast does the job properly. did you consider this? --p
