Optimization of quicksort algorithm for real-time data processing in IoT systems with random pivot division and tail recursion
DOI:
https://doi.org/10.35335/mandiri.v14i1.401Keywords:
Internet of Things (IoT), Random Pivot, Real-Time Data Processing, Tail Recursion, QuickSortAbstract
Real-time data processing in Internet of Things (IoT) systems requires efficient sorting algorithms to handle large and ever-increasing volumes of data. The QuickSort algorithm is often used due to its speed and efficiency, but on large pre-sorted datasets, this algorithm can experience performance degradation due to poor pivot selection and the use of regular recursion. This study aims to optimize the QuickSort algorithm through random pivot selection and the application of tail recursion to improve sorting efficiency on IoT datasets. Experiments were conducted by comparing the standard QuickSort version and the optimized version, using synthetic and real-time IoT datasets from temperature and humidity sensors. Performance evaluation was based on execution time and memory usage metrics. The results show that QuickSort with random pivot and tail recursion can reduce execution time by up to 27% and memory usage by up to 18% compared to the standard QuickSort implementation. These findings indicate that the proposed algorithm is more efficient for IoT applications that require real-time data processing, and has the potential to be applied in distributed data systems and parallel processing for large-scale scenarios.
References
Allioui, H., & Mourdi, Y. (2023). Exploring the full potentials of IoT for better financial growth and stability: A comprehensive survey. Sensors, 23(19), 8015. https://doi.org/10.3390/s23198015
Bossen, F., Sühring, K., Wieckowski, A., & Liu, S. (2021). VVC complexity and software implementation analysis. IEEE Transactions on Circuits and Systems for Video Technology, 31(10), 3765–3778. https://doi.org/10.1109/TCSVT.2021.3072204
Čech, P., Lokoč, J., & Silva, Y. N. (2020). Pivot-based approximate k-NN similarity joins for big high-dimensional data. Information Systems, 87, 101410. https://doi.org/10.1016/j.is.2019.06.006
Diène, B., Rodrigues, J. J. P. C., Diallo, O., Ndoye, E. L. H. M., & Korotaev, V. V. (2020). Data management techniques for Internet of Things. Mechanical Systems and Signal Processing, 138, 106564. https://doi.org/10.1016/j.ymssp.2019.106564
Durelli, V. H. S., Durelli, R. S., Borges, S. S., Endo, A. T., Eler, M. M., Dias, D. R. C., & Guimarães, M. P. (2019). Machine learning applied to software testing: A systematic mapping study. IEEE Transactions on Reliability, 68(3), 1189–1212. https://doi.org/10.1109/TR.2019.2892517
Gamal, M., Ibrahim, O. A., Hamed, H. F. A., & Abd-Elnaby, S. F. M. (2024). Engineering’s Next Leap: How Fourth Industrial Revolution is Shaping the Future of the Industry. ERURJ, 3(2), 970–992. https://doi.org/10.21608/erurj.2024.245917.1086
Habeeb, R. A. A., Nasaruddin, F., Gani, A., Hashem, I. A. T., Ahmed, E., & Imran, M. (2019). Real-time big data processing for anomaly detection: A survey. International Journal of Information Management, 45, 289–307. https://doi.org/10.1016/j.ijinfomgt.2018.08.006
Halder, R. K., Uddin, M. N., Uddin, M. A., Aryal, S., & Khraisat, A. (2024). Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifications. Journal of Big Data, 11(1). https://doi.org/10.1186/s40537-024-00973-y
Hua, Y., Huang, K., Zheng, S., & Huang, L. (2021). PMSort: An adaptive sorting engine for persistent memory. Journal of Systems Architecture, 120, 102279. https://doi.org/10.1016/j.sysarc.2021.102279
Isozaki, A., Mikami, H., Hiramatsu, K., Sakuma, S., Kasai, Y., Iino, T., Yamano, T., Yasumoto, A., Oguchi, Y., & Suzuki, N. (2019). A practical guide to intelligent image-activated cell sorting. Nature Protocols, 14(8), 2370–2415. https://doi.org/10.1038/s41596-019-0183-1
Khatun, M. S., Liu, A., & Miraz, M. H. (2022). BCoT-Based Smart Manufacturing: An Enhanced Precise Measurement Management System. International Conference for Emerging Technologies in Computing, 29–53. https://doi.org/10.1007/978-3-031-25161-0_3
Kopetz, H., & Steiner, W. (2022). Internet of things. In Real-time systems: design principles for distributed embedded applications (pp. 325–341). Springer.
https://doi.org/10.1007/978-3-031-11992-7_13
Kumar, D. P., Amgoth, T., & Annavarapu, C. S. R. (2019). Machine learning algorithms for wireless sensor networks: A survey. Information Fusion, 49, 1–25. https://doi.org/10.1016/j.inffus.2018.09.013
Lee, J., Wu, F., Zhao, W., Ghaffari, M., Liao, L., & Siegel, D. (2014). Prognostics and health management design for rotary machinery systems—Reviews, methodology and applications. Mechanical Systems and Signal Processing, 42(1), 314–334. https://doi.org/https://doi.org/10.1016/j.ymssp.2013.06.004
Li, C., Chen, Y., & Shang, Y. (2022). A review of industrial big data for decision making in intelligent manufacturing. Engineering Science and Technology, an International Journal, 29, 101021. https://doi.org/10.1016/j.jestch.2021.06.001
Mankowitz, D. J., Michi, A., Zhernov, A., Gelmi, M., Selvi, M., Paduraru, C., Leurent, E., Iqbal, S., Lespiau, J.-B., & Ahern, A. (2023). Faster sorting algorithms discovered using deep reinforcement learning. Nature, 618(7964), 257–263. https://doi.org/10.1038/s41586-023-06004-9
Memon, R. A., Li, J. P., Nazeer, M. I., Khan, A. N., & Ahmed, J. (2019). DualFog-IoT: Additional fog layer for solving blockchain integration problem in Internet of Things. Ieee Access, 7, 169073–169093. https://doi.org/10.1109/ACCESS.2019.2952472
Moghaddam, S. S., & Moghaddam, K. S. (2022). A general framework for sorting large data sets using independent subarrays of approximately equal length. IEEE Access, 10, 11584–11607. https://doi.org/10.1109/ACCESS.2022.3145981
Mohamed, A., Najafabadi, M. K., Wah, Y. B., Zaman, E. A. K., & Maskat, R. (2020). The state of the art and taxonomy of big data analytics: view from new big data framework. Artificial Intelligence Review, 53, 989–1037. https://doi.org/10.1007/s10462-019-09685-9
Nalepa, J., & Kawulok, M. (2019). Selecting training sets for support vector machines: a review. Artificial Intelligence Review, 52(2), 857–900. https://doi.org/10.1007/s10462-017-9611-1
Rao, T. R., Mitra, P., Bhatt, R., & Goswami, A. (2019). The big data system, components, tools, and technologies: a survey. Knowledge and Information Systems, 60, 1165–1245. https://doi.org/10.1007/s10115-018-1248-0
Roussel, R., Edelen, A. L., Boltz, T., Kennedy, D., Zhang, Z., Ji, F., Huang, X., Ratner, D., Garcia, A. S., & Xu, C. (2024). Bayesian optimization algorithms for accelerator physics. Physical Review Accelerators and Beams, 27(8), 084801. https://doi.org/10.1103/PhysRevAccelBeams.27.084801
Sallam, K., Mohamed, M., & Mohamed, A. W. (2023). Internet of Things (IoT) in supply chain management: challenges, opportunities, and best practices. Sustainable Machine Intelligence Journal, 2, 1–3. https://doi.org/10.61185/SMIJ.2023.22103
Singh, D., & Chandel, R. (2023). FPGA-based hardware-accelerated design of linear prediction analysis for real-time speech signal. Arabian Journal for Science and Engineering, 48(11), 14927–14941. https://doi.org/10.1007/s13369-023-07926-2
Swamy, S. N., & Kota, S. R. (2020). An Empirical Study on System Level Aspects of Internet of Things (IoT). IEEE Access, 8, 188082–188134. https://doi.org/10.1109/ACCESS.2020.3029847
Xiang, Y., & Kim, H. (2019). Pipelined data-parallel CPU/GPU scheduling for multi-DNN real-time inference. 2019 IEEE Real-Time Systems Symposium (RTSS), 392–405. https://doi.org/10.1109/RTSS46320.2019.00042
Younan, M., Houssein, E. H., Elhoseny, M., & Ali, A. A. (2020). Challenges and recommended technologies for the industrial internet of things: A comprehensive review. Measurement, 151, 107198. https://doi.org/10.1016/j.measurement.2019.107198
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Firdaus Laia, Ferdinand Tharorogo Wau, Jonson Manurung

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.