Optimization of quicksort algorithm for real-time data processing in IoT systems with random pivot division and tail recursion - Laia, Firdaus; Wau, Ferdinand Tharorogo; Manurung, Jonson (Institute of Computer Science (IOCS), 2025)
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.