Compiler optimization, reducing data load from memory and not using off-line data are issues that effective in enhancing energy retention of multimedia, embedded and general-purpose systems. In these systems most programs are comprised from loops, and this shows the importance of compiler optimization. In this paper we have carried out loop reduction using calculation and fusing two loops and transforming them to one loop that caused data locality increase and reusability, and decreased loading data from memory, thus increase speedup. We have applied this technique on several feature extraction algorithms, such as mean and variance and some similar algorithms like covariance and third moment that are used in content-based image retrieval systems. This technique approximately increases efficiency of two loops method twice. In addition, we have calculated the combination of these three functions. In this way, we have observed that the combined version also increases the efficiency twice.