What it solves
One fixed sorting algorithm cannot satisfy every stability, scratch and recursion constraint.
How it works
1Data constraints→2dispatcher + profile→3eligible algorithm→4result
Use it when
Sort small nearly ordered arrays with low overhead
Require stable ordering when scratch memory is available
Avoid recursion in a constrained build
Audit why a strategy was selected
Quick Start
#include "loxsort/loxsort.h"
lox_sort_options_t opt={0}; lox_sort_result_t result={0};
opt.profile=&lox_profile_generic;
(void)lox_sort(items,count,sizeof *items,int_compare,NULL,&opt,&result);
/* Expected: sorted items and a reported selected strategy. */Engineering evidence
- Tests cover API, algorithms, dispatch, profile logic and stability
- A one-million-dataset release benchmark is documented, including non-optimal aggregate views
Known limits
- Experimental; not presented as a universal performance winner
- Stable merge requires a full scratch buffer
- Profile quality depends on offline benchmark data