You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d41d92e
Browse filesBrowse the repository at this point in the historyBrowse files
Sort dictionary columns by rank instead of decoded strings
A row's alphabetical rank orders exactly as its decoded value does --
the basis of the FULL rank index -- so _build_lex_keys can hand lexsort
an int32 key and skip both the decode and lexsort's string comparisons.
The code -> rank map is extracted as _dict_code_to_rank so the sort and
the index builder cannot drift apart.
200k rows, cardinality 5000: key construction 106.2 -> 21.4 ms,
sort_by(view=True) 246.7 -> 156.9 ms, descending 273.5 -> 156.2 ms
(an object key could not be negated, so descending went through a
double argsort that an int32 key does not need).
_sorted_small_copy_from_live_positions held a second copy of the key
builder with the same decode, a narrower dtype list (no StringDType
keys) and a KeyError for computed sort columns, and it re-read the
column after already gathering the codes. It now calls _build_lex_keys
with the arrays it gathered, which removes the duplicate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments