Convert an i64 to a sortable u64 whose natural ordering matches signed integer ordering.
Adds i64::MAX + 1 (0x8000000000000000) to shift the range to unsigned.
Fast custom numeric parser: parses sign + digits + optional decimal directly from bytes.
Avoids UTF-8 validation and str::parse::() overhead entirely.
Uses batch digit processing for the integer part (4 digits at a time) to reduce
loop iterations and branch mispredictions.
Select a concrete comparison function based on KeyOpts.
Returns (compare_fn, needs_leading_blank_strip, needs_reverse).
The caller applies blank-stripping and reversal outside the function pointer,
eliminating all per-comparison branching.
Fast integer-only parser for numeric sort (-n).
Returns Some(i64) if the value is a pure integer (no decimal point, no exponent).
Returns None if the value has a decimal point or is not a valid integer.
This avoids the f64 conversion path for integer-only data.
Uses wrapping arithmetic (no overflow checks) for speed — values >18 digits
may wrap but sort order is still consistent since all values wrap the same way.