Skip to content

Inplementation of some basic sort algorithms and some simple tests.

License

Notifications You must be signed in to change notification settings

jamesnulliu/MySort

Repository files navigation

MySort - Benchmark Sorting Algorithms

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge license - Apache-2.0

1. Features

1.1. A Collection of Sorting Algorithms

We provide a collection of sorting algorithms, including:

  • std::sort
  • std::stable_sort
  • Bubble Sort (with different optimizations)
  • Insertion Sort
  • Selection Sort
  • Heap Sort
  • Merge Sort
  • Quick Sort (Hoare / Lomuto) (with different optimizations)
  • PDQ Sort

1.2. A Benchmark Framework

We provide a benchmark framework to test the performance of the sorting algorithms. The testing framework is consists of different test patterns, which can be easily customized by users.

The framework can visualize the distribution of the test data, and compare the performance of different sorting algorithms. It is easy to extend any part of the framework by specializing the template classes.

1.3. Multi-Platform Support

We provide a cross-platform build system with CMake and Ninja. The project can be easily built on both UNIX-based systems and Windows, with the scripts provided in the repository.

2. Environment Setup

Please check Env Setup Guide for Linux or Env Setup Guide for Windows for more a detailed guide.

3. Quick Start

3.1. Build the Required Libs

Run following command to build the required libs:

UNIX-based Systems:

bash scripts/build-libs.sh

Windows:

Note that initializing git submodules may failed on windows.
If you encounter any error, please use git bash instead.

.\scripts\build-libs.ps1

The generated libs should be in ./libs directory.

3.2. Build MySort

Run following command to build MySort:

On UNIX-based Systems:

bash scripts/build.sh

On Windows:

.\scripts\build.ps1

You will find a binary file in ./bin directory.

3.3. Testing

Execute the binary file and the results will be printed on the screen.

4. Extend the Benchmark Framework

To do...

About

Inplementation of some basic sort algorithms and some simple tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published