[Autoloop: tsb-perf-evolve] - #245
Merged
Merged
Conversation
Eliminate 1.6MB TypedArray allocation per sortValues call at n=100k. Per-call: finBuf(400KB) + nanBuf(400KB) + fvals(800KB) = 1.6MB × 50 iters = 80MB GC. Now lazily grown module-level buffers, like the existing radix ping-pong buffers. Also reuse _fvalsU32 as a persistent Uint32Array view of _fvals.buffer. Run: https://github.com/githubnext/tsessebe/actions/runs/25137904374 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Goal
Minimize
fitness = tsb_mean_ms / pandas_mean_msforSeries.sortValuesat n=100k. Lower is better;< 1.0means tsb beats pandas.Program Issue: #189
Current best metric: 27.999
Iteration 27: Make finBuf/nanBuf/fvals module-level
Eliminate 1.6MB TypedArray allocation per
sortValuescall:finBuf(400KB),nanBuf(400KB),fvals(800KB) → module-level, grown lazily_fvalsU32→ persistentUint32Arrayview of_fvals.buffer, updated on reallocationThe radix sort ping-pong buffers were already module-level; this extends the same pattern to the pre-partition buffers.
Run: https://github.com/githubnext/tsessebe/actions/runs/25137904374
🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.