Skip to content

Add LLVM::Attribute::Cold for overflow handling in function attributes#16754

Closed
kojix2 wants to merge 1 commit intocrystal-lang:masterfrom
kojix2:attr_cold
Closed

Add LLVM::Attribute::Cold for overflow handling in function attributes#16754
kojix2 wants to merge 1 commit intocrystal-lang:masterfrom
kojix2:attr_cold

Conversation

@kojix2
Copy link
Contributor

@kojix2 kojix2 commented Mar 18, 2026

This pull request is intended to present an idea.
I explored LLVM attributes that are not currently used in Crystal but might contribute to performance improvements with the help of LLMs. As a result, cold emerged as one candidate. As a trial, I added the cold attribute to the function that raises overflow exceptions. Unfortunately, benchmarks showed no clear improvement and results were slightly slower. I'll close this.

@kojix2 kojix2 closed this Mar 18, 2026
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