From 94a092c17e956413bed1ef83ed1db22d730e25b2 Mon Sep 17 00:00:00 2001 From: Patrick Schneider Date: Thu, 25 Sep 2025 13:52:25 +0200 Subject: [PATCH] first working binary msd radix + robinhood. --- .vscode/settings.json | 13 ++++++++++++- result.1.txt | 5 +++++ result.txt | 5 ----- src/sorter.cpp | 1 + 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 result.1.txt diff --git a/.vscode/settings.json b/.vscode/settings.json index c5206a7..6c419f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -72,6 +72,17 @@ "cinttypes": "cpp", "typeinfo": "cpp", "variant": "cpp", - "bitset": "cpp" + "bitset": "cpp", + "hash_map": "cpp", + "complex": "cpp", + "coroutine": "cpp", + "forward_list": "cpp", + "hash_set": "cpp", + "future": "cpp", + "shared_mutex": "cpp", + "stack": "cpp", + "cfenv": "cpp", + "typeindex": "cpp", + "valarray": "cpp" } } \ No newline at end of file diff --git a/result.1.txt b/result.1.txt new file mode 100644 index 0000000..6c3f608 --- /dev/null +++ b/result.1.txt @@ -0,0 +1,5 @@ +RESULT name=sort n=100 t=1 iterations=531 durationNanoseconds=1883 totalDurationNanoseconds=1000180 constructorNanoseconds=225 totalConstructorNanoseconds=119650 +RESULT name=sort n=1000 t=1 iterations=28 durationNanoseconds=36451 totalDurationNanoseconds=1020630 constructorNanoseconds=805 totalConstructorNanoseconds=22540 +RESULT name=sort n=10001 t=1 iterations=2 durationNanoseconds=607460 totalDurationNanoseconds=1214920 constructorNanoseconds=29805 totalConstructorNanoseconds=59610 +RESULT name=sort n=100000 t=1 iterations=1 durationNanoseconds=25963576 totalDurationNanoseconds=25963576 constructorNanoseconds=568500 totalConstructorNanoseconds=568500 +RESULT name=sort n=10000000 t=1 iterations=1 durationNanoseconds=238699610782 totalDurationNanoseconds=238699610782 constructorNanoseconds=51903183 totalConstructorNanoseconds=51903183 diff --git a/result.txt b/result.txt index 4b0b6b5..e69de29 100644 --- a/result.txt +++ b/result.txt @@ -1,5 +0,0 @@ -RESULT name=sort n=100 t=1 iterations=545 durationNanoseconds=1835 totalDurationNanoseconds=1000511 constructorNanoseconds=232 totalConstructorNanoseconds=126950 -RESULT name=sort n=1000 t=1 iterations=29 durationNanoseconds=35382 totalDurationNanoseconds=1026091 constructorNanoseconds=773 totalConstructorNanoseconds=22440 -RESULT name=sort n=10001 t=1 iterations=2 durationNanoseconds=592405 totalDurationNanoseconds=1184811 constructorNanoseconds=31980 totalConstructorNanoseconds=63960 -RESULT name=sort n=100000 t=1 iterations=1 durationNanoseconds=24243178 totalDurationNanoseconds=24243178 constructorNanoseconds=562170 totalConstructorNanoseconds=562170 -RESULT name=sort n=10000000 t=1 iterations=1 durationNanoseconds=219559500741 totalDurationNanoseconds=219559500741 constructorNanoseconds=53379598 totalConstructorNanoseconds=53379598 diff --git a/src/sorter.cpp b/src/sorter.cpp index 77093a0..4f78d38 100755 --- a/src/sorter.cpp +++ b/src/sorter.cpp @@ -21,6 +21,7 @@ void sorter::sort(container& data) { std::ranges::copy(data.placeholder_[0], std::back_inserter(copy)); std::sort(copy.begin(), copy.end()); #endif + // std::sort(data.placeholder_[0].begin(), data.placeholder_[0].end()); sorter::msd_inplace_radix_sort(data.placeholder_[0], 0, [&](auto span) {sorter::robin_hood_sort(span);}); #if DEBUG