This project is used to benchmark a collection of algorithms using a basic start-stop benchmarking strategy. The program performs each sort 10 times and saves the average runtime in milliseconds for every array size the user has requested. The algorithms currently implemented are as follows:
- Bubble Sort
- Counting Sort
- Insertion Sort
- Merge Sort
- Selection Sort
Note that this project requires JDK 21 or higher to run. To run the program...
- Clone this repository to your local machine
- Compile and run
src/BenchmarkRunner.java
- Follow the instructions shown in the terminal
When running this program you have two options:
- Run the included .jar file using
java -cp ./algorithm-benchmarking-in-java.jar BenchmarkRunner
to begin the program
The steps I used to generate a .jar
artefact in Intellij can be found
here