I know with changing the variable type, the speed of the program change. I want to understand the other effects of this change in the software performance.
I want to know if we use a floating point variable instead of fixed point variable,the amount of memory consumption and speed of program, what will change?
If you are dealing with low level languages, tuning the application for performance, changing data type would be a tradeoff between optimization and capacity. For example, suppose you have a 4GB machine, and an application keeps int/long (8 bytes in c++), if you know that you are not dealing with variables whose value are so large, you can change to (ushort or char), thus improving performance by locality in RAM.
Of corse, there are several factors in play, which are application dependant, but generaly perf improvements due to type change deal with locality and ability to fit more data in memory or caches.