Javascript is required
Search

Acadlore takes over the publication of IJCMEM from 2025 Vol. 13, No. 3. The preceding volumes were published under a CC BY 4.0 license by the previous owner, and displayed here as agreed between Acadlore and the previous owner. ✯ : This issue/volume is not published by Acadlore.

Open Access
Research article

Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning

Esraa H. Alwan1*,
Ali Kadhum M. Al-Qurabat2
1
Department of Computer Science, College of Science for Women, University of Babylon, Babylon 51002, Iraq
2
Department of Cyber Security, College of Sciences, Al-Mustaqbal University, Babylon 51001, Iraq
International Journal of Computational Methods and Experimental Measurements
|
Volume 12, Issue 3, 2024
|
Pages 281-287
Received: 08-18-2024,
Revised: 09-09-2024,
Accepted: 09-18-2024,
Available online: 09-29-2024
View Full Article|Download PDF

Abstract:

Loop unrolling is a well-known code-transforming method that can enhance program efficiency during runtime. The fundamental advantage of unrolling a loop is that it frequently reduces the execution time of the unrolled loop when compared to the original loop. Choosing a large unroll factor might initially save execution time by reducing loop overhead and improving parallelism, but excessive unrolling can result in increased cache misses, register pressure, and memory inefficiencies, eventually slowing down the program. Therefore, identifying the optimal unroll factor is of essential importance. This paper introduces three ensemble-learning techniques—XGBoost, Random Forest (RF), and Bagging—for predicting the efficient unroll factor for specific programs. A dataset comprises various programs derived from many benchmarks, which are Polybench, Shootout, and other programs. More than 220 examples, drawn from 20 benchmark programs with different loop iterations, used to train three ensemble-learning methods. The unroll factor with the biggest reduction in program execution time is chosen to be added to the dataset, and ultimately it will be a candidate for the unseen programs. Our empirical results reveal that the XGBoost and RF methods outperform the Bagging algorithm, with a final accuracy of 99.56% in detecting the optimal unroll factor.

Keywords: Loop unroll, Compiler optimization, Ensemble learning, Random Forest, Bagging, XGBoost


Cite this:
APA Style
IEEE Style
BibTex Style
MLA Style
Chicago Style
GB-T-7714-2015
Alwan, E. H. & Al-Qurabat, A. K. M. (2024). Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning. Int. J. Comput. Methods Exp. Meas., 12(3), 281-287. https://doi.org/10.18280/ijcmem.120308
E. H. Alwan and A. K. M. Al-Qurabat, "Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning," Int. J. Comput. Methods Exp. Meas., vol. 12, no. 3, pp. 281-287, 2024. https://doi.org/10.18280/ijcmem.120308
@research-article{Alwan2024OptimizingPE,
title={Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning},
author={Esraa H. Alwan and Ali Kadhum M. Al-Qurabat},
journal={International Journal of Computational Methods and Experimental Measurements},
year={2024},
page={281-287},
doi={https://doi.org/10.18280/ijcmem.120308}
}
Esraa H. Alwan, et al. "Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning." International Journal of Computational Methods and Experimental Measurements, v 12, pp 281-287. doi: https://doi.org/10.18280/ijcmem.120308
Esraa H. Alwan and Ali Kadhum M. Al-Qurabat. "Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning." International Journal of Computational Methods and Experimental Measurements, 12, (2024): 281-287. doi: https://doi.org/10.18280/ijcmem.120308
ALWAN E H, AL-QURABAT A K M. Optimizing Program Efficiency by Predicting Loop Unroll Factors Using Ensemble Learning[J]. International Journal of Computational Methods and Experimental Measurements, 2024, 12(3): 281-287. https://doi.org/10.18280/ijcmem.120308