Comparison of performances of ML-Algorithms in the estimation of the execution time of non-parallel Java programs
I. M. Mihindu Pramantha De Ranasinghe ,
Sysco LABS Technologies (Pvt) Ltd, Colombo 03, LK
University of Kelaniya, LK
Software Engineering Teaching Unit
Performance enhancement of a computer program is an important aspect of today's world. Developers produce programs, and there is a lack of accurate methods for predicting the execution time of a computer program prior to its execution in an executable environment. Predicting the execution time of a particular program before execution would be great for developing the program with the highest performance efficiency and with the lowest execution latency. This research introduces a Machine Learning based solution to predict an execution-time-based label for a given computer program. There are three main types of parameters in a computer program that affect the execution time, such as Static Code Features, HTTP Calls, and the Hardware Performance of the execution environment. In this research, the Machine Learning model was trained for the parameters of the above types (Programs with Static Programs & HTTP calls) by executing them on a fixed hardware infrastructure execution condition. We analyzed the number of if conditions, methods, breaks, switches, loops, nested-loop-depth, frequencies, and the behaviour of HTTP calls, kind of features of a computer program in order to generate an accurate execution time complexity prediction label of a computer program. Further, in the collected data set, the most prominent feature which affects the complexity among the features that we considered is the number of HTTP calls and nested loop depth, followed by loops. Accuracy Score, Precision, Recall, and F1 Score values of the ML model were generated for the traditional classification algorithms such as Decision Tree Classifier, K Nearest Neighbor Classifier, Random Forest Classifier, Naive Bayes Classifier, Support Vector Classifier, and MLP Classifiers in order to verify the effectiveness of the model. The best accuracy score was achieved with an overall 88% by using the approach of Random Forest. The findings of this research can be optimized for implementing an IDE plugin or a developer tool that can predict the exact execution time of a given computer program live by integrating the specifications of the execution device. It will help developers in terms of optimizing a particular computer program and developing it for a minimum execution latency and enhancing the performance of the program.
How to Cite:
De Ranasinghe, I.M.M.P. and Munasinghe, L., 2023. Comparison of performances of ML-Algorithms in the estimation of the execution time of non-parallel Java programs. Journal of Science of the University of Kelaniya, 16(1), pp.15–21. DOI: http://doi.org/10.4038/josuk.v16i1.8074
20 Apr 2023.