Skip to content

Comments

Reduce monomorphized code in execute_maybe_iterate#1046

Merged
Veykril merged 2 commits intosalsa-rs:masterfrom
MichaReiser:avoid-monomorphization-execute-maybe-iterate
Dec 26, 2025
Merged

Reduce monomorphized code in execute_maybe_iterate#1046
Veykril merged 2 commits intosalsa-rs:masterfrom
MichaReiser:avoid-monomorphization-execute-maybe-iterate

Conversation

@MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented Dec 26, 2025

The execute_maybe_iterate function is rather large but not all of its code is generic over C.

This PR extracts the not-generic code into a few helper functions to reduce the size of the compiled code.

Before, many functions with cycle handling generated about 8KB of code each (often beeing within the largest functions of the entire ty binary).
This PR reduces the size to about 5KB each (results in a 200KB reduction overall)

@netlify
Copy link

netlify bot commented Dec 26, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 1ca0621
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/694e607a324e9e000862f420

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 26, 2025

CodSpeed Performance Report

Merging #1046 will not alter performance

Comparing MichaReiser:avoid-monomorphization-execute-maybe-iterate (1ca0621) with master (ce80691)

Summary

✅ 13 untouched

@MichaReiser MichaReiser marked this pull request as ready for review December 26, 2025 10:20
@Veykril Veykril added this pull request to the merge queue Dec 26, 2025
Merged via the queue into salsa-rs:master with commit 26250f2 Dec 26, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Dec 26, 2025
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.

2 participants