mirror of
https://github.com/janet-lang/janet
synced 2024-06-25 22:53:16 +00:00
![]() The current implementation will have quadratic behaviour for already sorted arrays because it picks the last element as pivot. In an sorted array this splits the array repeatedly into the biggest value and all other values. The implementation in this commit uses the *median of three* as pivot. `janet -e "(sort (range 10000))"` to reproduce quadratic behaviour. |
||
---|---|---|
.. | ||
array_test.c | ||
boot.c | ||
boot.janet | ||
buffer_test.c | ||
number_test.c | ||
system_test.c | ||
table_test.c | ||
tests.h |