Skip to content

Radix sort fails with signed integers #4

Description

@reuseman

The current radix sort implementation cannot properly handle the signed integers:

$ ./bin/sort1 -n 5000 -r 16 i64:0
                     qsort_r-direct:     0 ms
                         quick-sort:     0 ms
                   quick-block-sort:     0 ms
                  std::sort-pointer:     0 ms
                    std::sort-index:     1 ms
runtime_error: radix-index-sort failed correctness check

This should be an efficient approach to handle it:
https://stackoverflow.com/questions/51721874/lsd-radix-sort-for-negative-integers-without-queue

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions