Merged
Conversation
Pre-copy finite numeric values into a parallel Float64Array (fvals) during the partition pass. For all-numeric Series the sort comparator now reads fvSlice[a]! - fvSlice[b]! instead of (vals[a] as ...) < (vals[b] as ...), giving the JIT an unboxed, monomorphic Float64Array call site and replacing two branch comparisons with a single FP subtraction per comparison. For string/boolean/mixed Series the existing generic branch comparator is used unchanged. Run: https://github.com/githubnext/tsessebe/actions/runs/24830395075 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
@copilot fix tests |
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/ecf1056a-d429-45df-964d-d721723e5413 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.
Program Goal
Evolve
Series.sortValuesso that tsb runs at least as fast as pandas on the synthetic benchmark (n=100k float64 with 5% NaN). Fitness =tsb_mean_ms / pandas_mean_ms(lower is better; < 1.0 = tsb wins).Program Issue: #189
Iteration 2 — Float64Array parallel values for monomorphic numeric sort
Operator: Exploration (Island 1, parallel-typed-arrays × comparison)
Change: Pre-copy finite numeric values into a parallel
Float64Array (fvals)during the partition pass. For all-numeric Series, the sort comparator now readsfvSlice[a]! - fvSlice[b]!(typed Float64Array subtraction) instead of(vals[a] as number|string|boolean) < (vals[b] as ...)(generic T[] access + branch comparison).Hypothesis: Float64Array access gives the JIT a monomorphic, unboxed call site. A single FP subtraction replaces two branches per comparison. Over ~1.7M comparisons for n=100k, this should measurably reduce sort time.
For string/boolean/mixed Series the original generic comparator is used unchanged.
Baseline: Island 1 implementation (NaN pre-partition + Uint32Array indirect sort) is on
mainas of commit5792af4after PR #190 was merged.