Code Monkey home page Code Monkey logo

sorting-algorithms-analysis's Introduction

Sorting Algorithms Benchmarking

This is a Java-based benchmarking project that uses various sorting algorithms to sort an array of integers and characters. Sorting Algorithms

The following sorting algorithms are implemented:

  • Heap Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort (Hoare)
  • Quick Sort (Lomuto)
  • Selection Sort
  • Shell Sort
  • Three Way Merge Sort

Benchmarking

The project uses the Java Microbenchmark Harness (JMH) to benchmark the performance of the sorting algorithms. The benchmarking process measures the average time taken by each algorithm to sort an array of 10,000 integers as well as character arrays of sizes 16K, 32K, 64K, 128K, and 256K.

Results

Algorithm 32K Characters 64K Characters 128K Characters 256K Characters
Heap Sort 3.45ms 7.27ms 15.00ms 33.09ms
Insertion Sort 392.49ms 1562.43ms 6475.71ms 127300.75ms
Merge Sort 2.68ms 5.62ms 12.06ms 24.78ms
Quick Sort (Hoare) 13.46ms 37.95ms 171.84ms 826.64ms
Quick Sort (Lomuto) 56.42ms 216.19ms 865.12ms 3922.36ms
Selection Sort 528.86ms 2113.45ms 8441.46ms 33727.43ms
Shell Sort 2.85ms 6.25ms 14.24ms 37.51ms
3-Way Merge Sort 2.23ms 4.82ms 9.86ms 21.17ms

sorting-algorithms-analysis's People

Contributors

mtcnbzks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.