ORIGINAL: Ron Kuper [Cakewalk]
Floating point implementations will generally waste memory and result in slower execution (on most CPU's).
I am pretty sure floating point is faster than fixed point on Pentium and x64 CPUs, and uses the same amount of memory.
Regarding memory you're wrong. Fixed point implementation (when done correctly), will not use the same number of bits for all variables. It has more flexibility. Also, people often use block floating point for arrays, etc. That saves a lot based on array sizes. If you have a simple algorithm it doesn't really matter what you do, but
for more memory intensive algorithms, fixed point will always win. Regarding execution speed it depends. It depends on the instruction set, ALU structure, existence or not of a barrel shifter and type and number of the accumulators. If you have a single cycle integer MAC operations with a barrel shifter at the output, fixed point would be either faster or the same speed as floating point. (for most algorithms)
Sometimes fixed point would require more operations to implement what floating point would do in less. However, based on the number of cycles used and number of memory accesses necessary it is not always easy to guess which one would be faster.
I'm no expert on Pentium instruction set, so I do not know if what I mentioned above is available or not. However, I worked on most existing DSP's since the 1980's including many RISC CPU's. On all of them fixed point was always faster and used considerably less memory. There was no exception.
As for the types of instructions, you should definitely use "integer" instructions for fixed point math. They will be faster. As for the saturation, you shouldn't worry about it much. People who do fixed point for living, know how to deal with it efficiently. Also, most good CPU's know how to handle integer saturation properly. (all DSP CPU's do it for sure)
Finally, 1-bit shift following multiply is only needed for some types of fixed point algorithms. If the CPU does not support implied shift (happens in the same cycle as the multiply) you do not really have to use it. That is, you do not need to use always Q15, Q31 or Q47 number formats, you can use arbitrary Q-formats and keep track of where the format goes, so you adjust only the final results instead of all intermediate products or sums.......
You would be amazed to find out how much faster you can get things to execute with fixed point math. (especially if the CPU architecture enables you to do it with efficient integer operations as mentioned above)
However, I must point out (again), it would come at a price. Highly skilled fixed point DSP programmers (paid considerbly more than a high school floating point "wizz") are not easy to find. Development is harder and takes more time and thinking since the algorithms have to be converted with a lot of care. Debugging is harder and maintenance will cost more.
Regards,
Bogdan