core: introduce sample sort algorithm
The algorithm runs sort in multiple threads and does not use OpenMP. It has better threads utilization right from the beginning but probably a worse constant than parallel qsort. See details in code comments. Besides sort is not performed in calling thread but instead in spawned worker threads. Calling thread yields waiting for worker threads to finish. Exception is small data size, in this case sorting is executed in calling thread saving time on spawning a thread. This should speed up test execution. This is existing behaviour of qsort_arg but data size threshold is reduced from 128000 to 1024. Part of #3389 NO_CHANGELOG=internal NO_DOC=internal
parent
8eb86462
No related branches found
No related tags found
Showing
- src/lib/core/CMakeLists.txt 1 addition, 0 deletionssrc/lib/core/CMakeLists.txt
- src/lib/core/tt_sort.c 488 additions, 0 deletionssrc/lib/core/tt_sort.c
- src/lib/core/tt_sort.h 39 additions, 0 deletionssrc/lib/core/tt_sort.h
- test/unit/CMakeLists.txt 5 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/qsort_arg.cc 3 additions, 1 deletiontest/unit/qsort_arg.cc
- test/unit/qsort_arg.result 0 additions, 17 deletionstest/unit/qsort_arg.result
- test/unit/tt_sort.cc 262 additions, 0 deletionstest/unit/tt_sort.cc
- third_party/qsort_arg.c 1 addition, 2 deletionsthird_party/qsort_arg.c
- third_party/qsort_arg.h 7 additions, 0 deletionsthird_party/qsort_arg.h
Loading
Please register or sign in to comment