Skip to content

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

Merged
mrjf merged 2 commits into
mainfrom
autoloop/tsb-perf-evolve
May 12, 2026
Merged

[Autoloop: tsb-perf-evolve]#297
mrjf merged 2 commits into
mainfrom
autoloop/tsb-perf-evolve

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

tsb perf evolve — Series.sortValues performance optimization

This PR accumulates accepted iterations from the Autoloop perf-evolution program targeting Series.sortValues.

Program goal: Minimize the fitness ratio tsb_mean_ms / pandas_mean_ms for sorting a 100k-element float Series.

Current best metric: 21.048 (tsb=112.50ms / pandas=5.34ms)

Program issue: #189

State file: tsb-perf-evolve.md

Iteration 41

Change: Inverse IEEE-754 gather — replace vals[origIdx] random access with sequential reads of srcBuf[si+1]/srcBuf[si+2] + inverse transform, avoiding cold-cache misses into the JS values array.

🤖 This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.

Generated by Autoloop · ● 38.7M ·

…void random vals[] access
Replace the gather loop's `vals[origIdx]` random access into the JS array
with an inverse IEEE-754 transform that reconstructs the float value directly
from the already-sorted AoS key words (keyLo, keyHi) in srcBuf. The sorted
AoS buffer is hot in cache after the final scatter pass; the original vals[]
array is cold after the init loop. Replacing the random read with sequential
reads + ~6 arithmetic ops should reduce cache pressure in the gather phase.
Run: https://github.com/githubnext/tsessebe/actions/runs/25712799061
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mrjf
mrjf marked this pull request as ready for review May 12, 2026 05:32
Biome formatter requires `~keyLo >>> 0` instead of `(~keyLo) >>> 0`.
Semantics are identical since ~ has higher precedence than >>>.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
ContributorAuthor

Commit pushed: 237b3f5

Generated by Evergreen — PR Health Keeper

@github-actions

Copy link
Copy Markdown
ContributorAuthor

Evergreen fix 🌲

CI failure fixed: The Test & Lint job was failing due to a formatting error in src/core/series.ts.

Root cause: Biome formatter requires ~keyLo >>> 0 instead of (~keyLo) >>> 0. The parentheses around the ~ (bitwise NOT) operand were redundant since ~ has higher precedence than >>>, so the semantics are unchanged.

Fix: Removed 8 redundant parentheses across 4 code locations in the IEEE-754 inverse gather path (commit 3e27c3a).

Local lint now passes with 0 errors, 571 warnings (same as main).

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
allowed:
- defaults
- "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by Evergreen — PR Health Keeper · ● 21.5M ·

@mrjf
mrjf merged commit d8968be into mainMay 12, 2026
6 checks passed
@github-actions
github-actionsBot deleted the autoloop/tsb-perf-evolve branch May 12, 2026 13:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@mrjf