Repository navigation
v0.4.0
·
10 commits
to master
since this release
Added
- Parallel Merge Dispatch (GCD): Implemented parallel execution for merge passes within the parallel sorting algorithm (
vsort_parallel_int,vsort_parallel_float) on Apple platforms usingdispatch_apply. This replaces the previous sequential merge loop, significantly improving performance for large arrays by leveraging multiple cores during the merge phase.
Changed
vsort_floatOptimization: Removed the fallback to standardqsort.vsort_floatnow uses the internal adaptive sorting framework (parallel dispatch, quicksort, insertion sort) consistent withvsortfor integers.- Hardware Detection (macOS): Improved robustness and efficiency by replacing
popencalls with directsysctlbynamesystem calls for detecting CPU cores, cache sizes, and other hardware characteristics. - Benchmark Mergesort: Refactored the
custom_mergesortimplementation inexamples/benchmark.cto use a single, pre-allocated temporary buffer, making it more efficient and a fairer comparison againstvsort. - Documentation (
README.md): Significantly updated to accurately reflect the v0.4.0 implementation status, including the new parallel merge dispatch, NEON status (planned), revised technical details, and updated roadmap. Removed placeholder performance tables. - Quicksort Stack: Increased default stack capacity in iterative quicksort and improved safety checks.
Fixed
- Build Warnings/Errors: Resolved various compiler warnings identified in previous builds, including
MIN/MAXmacro redefinitions (renamed toVSORT_MIN/VSORT_MAX), unused variables (pushed,timing_errors), unused functions (P/E core distribution logic, default float comparator), and issues withposix_memalignpreprocessor checks. - Benchmark Example (
examples/benchmark.c): ReplacedINFINITYwithDBL_MAXto resolve warnings/issues related to the-ffast-mathflag. Movedsrandcall to the beginning ofmainfor proper seeding. Corrected algorithm name reference fromstd::sorttostd_sort. Improved result reporting logic.