/SortingBenchmark

Benchmarking program in Java for different sorting algorithms

Primary LanguageJavaMIT LicenseMIT

Sorting Benchmarking Program in Java

Benchmarking program in Java for different sorting algorithms.

The main method is present at SortingBenchmarker.java. It displays the average runtime per sorting method based on the number of experiments (NUM_EXPERIMENTS) in nanoseconds per runs (RUNS).GeneratorSortingInput.java generates the SortingInput.txt used by the SortingBenchmarking program.

This benchmarking program has the following Java sorting programs:

  1. BinarySort
  2. BucketSort
  3. HeapSort
  4. InsertionSort
  5. MergeSort
  6. QuickSort
  7. SelectionSort
  8. ShellSort

Following is a sample benchmark of BucketSort and InsertionSort using the following test case on July 11, 2020 13:38:41 Philippine Standard Time: Test case:

Description Value
Value range -128 to 127
Total number of values 3,913,539
Number of iterations made (per run) 50
Average runtime duration per run in nanoseconds
Number of runs 20

Using a x64-bit Operating System in a x64-based processor (Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz 2.90 Ghz)

Speed comparison between BucketSort and InsertionSort in bar graph representation

Speed comparison per run between BucketSort and InsertionSort in line graph representation