Casting float to int, fast math operations on double/float
Posted: Tue Aug 19, 2008 8:25 pm
I've seen ASM routines in cast.h which seems to quickly convert integer into floats and floats into integer: if I directly call these functions instead of doing a simple cast from the compiler like int x= (float) y, how much faster will it be ?
also, I use libsamplerate in my project and it requires LRINT and LRINTF functions to be set: everything compiles fine so I guess they are present in libmath but again, what the performance against the functions in cast.h ?
thanks
PS: libsamplerate also ask about CPU_CLIPS_NEGATIVE and CPU_CLIPS_POSITIVE flags, does the Gekko automatically clips value on negative/positive float to int conversion ?
also, I use libsamplerate in my project and it requires LRINT and LRINTF functions to be set: everything compiles fine so I guess they are present in libmath but again, what the performance against the functions in cast.h ?
thanks
PS: libsamplerate also ask about CPU_CLIPS_NEGATIVE and CPU_CLIPS_POSITIVE flags, does the Gekko automatically clips value on negative/positive float to int conversion ?