fastr icon indicating copy to clipboard operation
fastr copied to clipboard

Implement the radixsort builtin

Open steve-s opened this issue 2 years ago • 0 comments

The current implementation of the radixsort builtin delegates to shellsort (order builtin), but it should instead implement the same algorithm as the reference implementation.

The implementation can be tested on the following benchmark:

x <- (1:3000000/3000000) + 1
print("shell")
for (i in seq(200))
        print(system.time(order(x, method="shell")))
print("auto")
for (i in seq(200))
        print(system.time(order(x)))

the first call order(x, method="shell") uses shell sort, the other order(x) should call into the radixsort builtin. GNU-R is faster when using radixsort and FastR should be too.

steve-s avatar May 16 '22 14:05 steve-s