| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(pf_sort_keys), | intent(in) | :: | keys |
the built key set. |
||
| integer(kind=int64), | intent(in) | :: | nrows |
rows to walk per pass. |
||
| integer(kind=int64), | intent(in) | :: | nreps |
passes. |
how many pairs compared less; -1 if unusable.
Test-only sweep of nreps passes of nrows comparisons, returning a checksum.
For bench/benchmark_sort_comparator.f90, which needs the comparator's own cost rather
than the cost of reaching it: at ~5 ns per comparison a per-call harness measures
its own overhead. The C++ twin is parquet_debug_sort_sweep_less_cpp in
src/parquet_wrapper.cpp and the two loops are deliberately identical, down to the
stride walk — their checksums must agree, which is what proves they did the same
work. Neither uses mod on a runtime divisor: that is an integer division, and it
would cost more than the comparison being timed.