https://github.com/pykello/the-sort
https://github.com/pykello/the-sort
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pykello/the-sort
- Owner: pykello
- Created: 2023-08-11T13:16:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-12T15:58:50.000Z (almost 3 years ago)
- Last Synced: 2025-04-10T10:21:07.687Z (about 1 year ago)
- Language: C++
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmarking parallel sort algorithms!
## Installing Requirements
```
sudo apt update
sudo apt install build-essential cmake libtbb-dev
```
## Building & Running
```
mkdir build
cd build
cmake ..
make
# Run all benchmarks
./sort
# Don't run std
./sort --disable-std
# Don't run partitioned
./sort --disable-partitioned
# Change data size
./sort --data-size 1000000
# Change thread counts
./sort --threads 4,8,16
```
## Results
* Data: 200M random 32-bit integers
* [Ryzen 3900x](https://www.amd.com/en/product/8436): 12 cores, 24 threads
* [EPYC 7502P](https://www.amd.com/en/products/cpu/amd-epyc-7502p): 32 cores, 64 threads
| Algorithm | threads | Ryzen 3900x | EPYC 7502P |
|------------------|---------|-------------|------------|
| std::sort seq | 1 | 13.760 s | 18.520 s |
| std::sort par | all | 1.554 s | 1.627 s |
| partitioned_sort | 2 | 7.812 s | 10.174 s |
| partitioned sort | 4 | 4.155 s | 5.255 s |
| partitioned sort | 8 | 2.322 s | 2.887 s |
| partitioned sort | 12 | 1.807 s | 2.041 s |
| partitioned sort | 16 | 1.550 s | 1.617 s |
| partitioned sort | 24 | **1.215 s** | 1.211 s |
| partitioned sort | 32 | 1.410 s | 1.016 s |
| partitioned sort | 64 | 1.584 s | **0.808 s**|
| partitioned sort | 128 | 2.201 s | 1.125 s |
| partitioned sort | 256 | 3.500 s | 1.685 s |