[Autoloop] [Autoloop: autoloop-autoloop-tsb-perf-evolve]#191
Closed
github-actions[bot] wants to merge 1 commit intomainfrom
Closed
[Autoloop] [Autoloop: autoloop-autoloop-tsb-perf-evolve]#191github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…ion (TypeScript-compliant) Run: https://github.com/githubnext/tsessebe/actions/runs/24816842111 - Replace boxed {v,i} pair allocation with Uint32Array index sort (Island 1) - Pre-partition NaN/null/undefined in O(n) pass (removes NaN check from comparator hot path) - Dispatch to monomorphic ascending/descending comparators for JIT specialization - Gather using for...of over TypedArray subviews (fixes noUncheckedIndexedAccess TypeScript errors from c001) - Eliminates N object allocations → zero GC pressure during sort phase Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Closing as a duplicate of #190. This PR was opened on branch The canonical PR for this program is #190, on branch |
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.sortValuesinsrc/core/series.tsso that tsb runs at least as fast as pandas on a 100k-element float64 Series with 5% NaN.Metric:
fitness = tsb_mean_ms / pandas_mean_ms— lower is better;< 1.0means tsb wins.What's in this PR
Iteration 1 (c002) — Island 1: Indirect typed-array sort with NaN pre-partition
Replaces the original O(N) object-allocation approach (
Nboxed{v, i}pairs + 2.map()calls) with:Uint32Arraybuffers — removes NaN check from comparator hot pathUint32Arrayof finite indices sorted in-place via indirect comparator — no boxed objects allocatedascendingbefore the sort, not inside the comparator — JIT-friendlyfor...of: collects output in a single pass; usesfor...ofover TypedArray subviews (yieldsnumberdirectly, satisfyingnoUncheckedIndexedAccess: true)Hypothesis: eliminating N object allocations + removing NaN from the comparator hot path should significantly reduce GC pressure and improve branch prediction at n=100k.
Current best metric: pending CI
Program issue: #189
State file:
autoloop-autoloop-tsb-perf-evolve.md