Perbandingan Algoritma Simple Sorting antara Penggunaan Variabel Temporary dan Tanpa Variabel Temporary - Achmad Arrosyidi; Didiet Anindita Arnandy (Jurnal Sistim Informasi dan Teknologi, 2022)
Temporary variables used in swapping technique on sorting algorithm. There are alternative swapping techniques uses pairs of + and -, × and / operators in the sorting process. This study aims to determine the duration of the sorting process uses the + and - operator pairs, the × and / operator, and the uses of temporary variables. By knowing the duration, it can determine the performance of each swapping technique. Important of this research it can contribute for advanced research or applied research. Data generated input algorithms in descending and ascending sequence. The input was sorted by 18 types of Bubble, Selection, and Insertion sort algorithm. Output sequence contrary from the data input. Duration sorting process obtained from the end processed time subtract by the start processed time. Sorting duration recapitulated to get the average duration of the sorting process so can be compared between swapping techniques. The test method has run 18 types of Simple sorting algorithms from 10, 50, and 100 data variants. frequency of each variant 10 times tests. The total data used 28,800 of integer types. Result of the average duration test that swapping uses × and / operators 306,236 milliseconds uses + and - operators 294,998 milliseconds, and swapping technique with temporary variables 294,557 milliseconds. The best performance showed by swapping technique uses temporary variables instead of uses pair of + and – operators, also used pair of × and / operators.