Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

ParallelAlgorithms

High Performance C++ Algorithms: parallel and sequential. Working VisualStudio 2019 solution is included with all supporting code and usage examples.

Benchmark Results of the following C++17 algorithms on Ubuntu 20.04 using g++, sorting an array of 10 Million unsigned integers:

  • single core: sort(sorted.begin(), sorted.end())
  • multi-core: sort(std::execution::par_unseq, sorted.begin(), sorted.end())
Algorithm Random Presorted Description
sort single core 14 72 48-core Intel Xeon, with hyperthreading (96 vCPUs)
sort multi-core 73 175 6-core Intel i7-9750H, with hyperthreading
sort multi-core 625 1,333 48-core Intel Xeon, with hyperthreading (96 vCPUs)

the units in the table above are Millions of unsigned integers per second.

Sorting an array of unsigned long integers:

Algorithm Random Presorted Description
sort single core 14 16 48-core Intel Xeon, with hyperthreading (96 vCPUs)
sort multi-core 71 6-core Intel i7-9750H, with hyperthreading
sort multi-core 401 513 48-core Intel Xeon, with hyperthreading (96 vCPUs)
Algorithm Random Presorted Constant Description
LSD Radix Sort multi-core 153 140 121 6-core Intel i7-9750H, with hyperthreading

Building on Ubuntu 20.04 Linux

To install g++ which supports C++17:

sudo apt install build-essential

To update gcc to support c++17 standard:

sudo apt update
sudo apt install libtbb-dev

To build, use g++ command and not gcc. The order of the following arguments matters!

g++ ParallelAlgorithms.cpp ParallelMergeSortBenchmark.cpp RadixSortLsdBenchmark.cpp ParallelStdCppExample.cpp -ltbb -std=c++17 -O3 -o ParallelAlgorithms

paypal

About

Parallel C++ algorithms

Resources

License

Releases

No releases published

Packages

No packages published

Languages