Skip to content

perf: Avoid heap allocating each task during string merging#1286

Merged
davidlattimore merged 1 commit into
mainfrom
push-vynkqomkxlpq
Nov 11, 2025
Merged

perf: Avoid heap allocating each task during string merging#1286
davidlattimore merged 1 commit into
mainfrom
push-vynkqomkxlpq

Conversation

@davidlattimore

Copy link
Copy Markdown
Member

Rayon's task spawning heap-allocates each spawned task. This commit switches to using a crossbeam queue then uses rayon's par_bridge to consume it.

This doesn't noticably affect runtime, but does slightly reduce many other measures like CPU cycles. Mostly it reduces heap allocations.

Rayon's task spawning heap-allocates each spawned task. This commit
switches to using a crossbeam queue then uses rayon's par_bridge to
consume it.

This doesn't noticably affect runtime, but does slightly reduce many
other measures like CPU cycles. Mostly it reduces heap allocations.
@davidlattimore davidlattimore merged commit 40929f3 into main Nov 11, 2025
38 of 39 checks passed
@davidlattimore davidlattimore deleted the push-vynkqomkxlpq branch November 11, 2025 08:41
davidlattimore added a commit that referenced this pull request Nov 26, 2025
…1286)"

This reverts commit 40929f3.

Using a channel for job control was an interesting experiment, but it
turns out that it composes really badly.
davidlattimore added a commit that referenced this pull request Nov 26, 2025
…1343)

This reverts commit 40929f3. (#1286)

Using a channel for job control was an interesting experiment, but it
turns out that it composes really badly.
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.

1 participant