Skip to content

Series.sortValues: LSD radix sort on IEEE-754 transformed keys#226

Merged
mrjf merged 3 commits intomainfrom
copilot/evolve-series-sortvalues
Apr 25, 2026
Merged

Series.sortValues: LSD radix sort on IEEE-754 transformed keys#226
mrjf merged 3 commits intomainfrom
copilot/evolve-series-sortvalues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

Autoloop iteration 12 for the tsb-perf-evolve program, targeting Series.sortValues to close the gap with pandas Series.sort_values on the n=100k benchmark (best so far: 27.999×).

Changes

  • src/core/series.ts: Replace comparator-based sort with an LSD 8-pass radix sort over IEEE-754 bit-transformed keys, eliminating ~1.6M JS comparator callbacks at n=100k.
  • Module-level ping-pong buffers reused across calls to avoid per-invocation allocation.

Patch sourced from the agent artifact of workflow run 24921830984, applied via git am --3way after the original push failed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/tsessebe/actions/runs/24921830984/artifacts
    • Triggering command: /usr/bin/gh gh run download 24921830984 -n agent -D /tmp/agent-24921830984 -R githubnext/tsessebe (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 25, 2026 that may be closed by this pull request
Replace Float64Array comparator sort with a callback-free LSD radix sort.
Eliminates ~1.6M JS comparator invocations at n=100k (the dominant bottleneck).
Module-level ping-pong buffers avoid per-call allocation. IEEE-754 transform
maps float64 to sortable uint64 keys. String/mixed fallback unchanged.

Run: https://github.com/githubnext/tsessebe/actions/runs/24921830984

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI changed the title [WIP] Evolve Series.sortValues for improved performance Series.sortValues: LSD radix sort on IEEE-754 transformed keys Apr 25, 2026
Copilot finished work on behalf of mrjf April 25, 2026 14:59
Copilot AI requested a review from mrjf April 25, 2026 14:59
@mrjf mrjf marked this pull request as ready for review April 25, 2026 18:53
@mrjf
Copy link
Copy Markdown
Contributor

mrjf commented Apr 25, 2026

@copilot fix tests

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 25, 2026

@copilot fix tests

CI failure was a Biome formatter error in src/core/series.ts (redundant parens around ~lo/~hi). Fixed in b33273e — lint now passes (no errors), all 5593 tests pass.

Copilot finished work on behalf of mrjf April 25, 2026 18:57
@mrjf mrjf merged commit 37dc6ff into main Apr 25, 2026
4 checks passed
@mrjf mrjf deleted the copilot/evolve-series-sortvalues branch April 25, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Autoloop] [Autoloop: tsb-perf-evolve]

2 participants