Any code which uses the X86 fistl instruction can be rewritten to use the
ISO 1999 C standard function lrint() and lrintf() to produce nearly exactly
the same code (ie on X86 lrint() becomes fistl instruction).
However, lrint() and lrintf() are portable across all architectures.
Numbers for AMD Opteron 244 system (fistl changed to lrint()):
jussi/own> time ./resamp_fixp
1.037u 0.000s 0:01.03 100.0% 0+0k 0+0io 76pf+0w
jussi/own> time ./resamp_float
1.970u 0.000s 0:01.96 100.5% 0+0k 0+0io 76pf+0w
jussi/own> time ./resamp_float_fistl
4.034u 0.001s 0:04.03 100.0% 0+0k 0+0io 90pf+0w
--
Jussi Laako <jussi.laako(a)pp.inet.fi>