https://github.com/jamesnulliu/mysort
Inplementation of some basic sort algorithms and some simple tests.
https://github.com/jamesnulliu/mysort
Last synced: 11 months ago
JSON representation
Inplementation of some basic sort algorithms and some simple tests.
- Host: GitHub
- URL: https://github.com/jamesnulliu/mysort
- Owner: jamesnulliu
- License: apache-2.0
- Created: 2023-06-11T07:43:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T03:16:56.000Z (almost 2 years ago)
- Last Synced: 2025-07-19T08:05:00.560Z (12 months ago)
- Language: C++
- Size: 1.27 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MySort - Benchmark Sorting Algorithms
      [](https://github.com/jamesnulliu/PrettyLazy0/blob/main/LICENSE)

## 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](./docs/Env_Setup_Guide_for_Linux.md) or [Env Setup Guide for Windows](./docs/Env_Setup_Guide_for_Windows.md) 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
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.
```powershell
.\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
bash scripts/build.sh
```
#### On Windows:
```powershell
.\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...