Stable release · 0.1.0
Sorting that adapts to your data¶
BielSort is a stable sorting library for CPython. It accelerates favorable large integer lists with native Counting Sort or Radix Sort, then falls back to Python's Timsort whenever that is the safer or more compatible choice.
Why BielSort?¶
Adaptive by design¶
The library inspects the workload and selects Counting Sort, Radix Sort, or Timsort instead of forcing one algorithm onto every input.
Python-compatible¶
Sorting remains stable. key=, reverse=, non-integers, huge integers, and
small or nearly ordered inputs deliberately use Python's mature Timsort.
Native fast paths¶
The C extension targets exact Python integers in the signed 64-bit range and provides both new-list and in-place operations.
Start in seconds¶
Pick the operation that matches your code¶
| Need | Python | BielSort |
|---|---|---|
| Create a new sorted list | sorted(values) |
bielsort.sort(values) |
| Mutate an existing list | values.sort() |
bielsort.sort_in_place(values) |
| See the selected strategy | — | bielsort.sort_with_strategy(values) |
| Mutate and see the strategy | — | bielsort.sort_in_place_with_strategy(values) |
A specialized tool, not a universal replacement
BielSort is most interesting for large list[int] workloads. Python's
built-in sorting remains an excellent default for general objects, small
inputs, nearly ordered data, key=, and reverse=. See
limits and compatibility before choosing it for a
production workload.