Native radix sorting followed by unique-key/multiplicity array construction #
This composes the complete native sorter and adjacent-run builder. Two length-n sorting
buffers are followed by length-n key and count output buffers. All four blocks lie in one
explicit frame. The returned keys are in unsigned encoding order; decoding signed keys does
not turn that order into signed integer order.
Main definitions #
deduplicateCode: fixed 16-register sorting and multiplicity program.deduplicateTime: complete structured instruction bound.
Main results #
deduplicate_exec: exact set enumeration and full multiplicities, with no sorting premise.
Original base retained while radix sorting swaps its two pointers.
Instances For
Install the two output pointers after the two sorting buffers.
Instances For
Complete sorting and deduplication; Deduplicate.out returns the number of unique words.
Instances For
All instructions, including pointer construction and both complete algorithms, excluding
only the final halt. For positive n and key-bit bound this is O(n * keyBits).
Instances For
Complete fixed-code radix sorting and adjacent deduplication, with full multiplicities.
Keys below 2^keyBits may repeat arbitrarily. Only the four length-n buffers change. The
conditions constrain arithmetic/address fit, not sorting or deduplication behavior.