Simple basecase improvement

This commit is contained in:
Robin Dietzel 2023-11-07 10:06:06 +01:00
parent ec1d2cdd46
commit e6c33df2a4

View File

@ -57,6 +57,11 @@ private:
auto split(std::span<T> &data, int depth, const int &mdepth, std::recursive_mutex &mutex) -> void {
if (std::distance(data.begin(), data.end()) <= 1) {
return;
} else if (std::distance(data.begin(), data.end()) == 2) {
if(cmp(data[1], data[0])) {
std::swap(data[0], data[1]);
return;
}
}
auto mid = data.begin();