Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use non-boxing forall and exists methods on strings #154

Merged
merged 2 commits into from
Jul 9, 2023

Conversation

kyri-petrou
Copy link
Contributor

Scala's Function1 doesn't have a specialization on Char, which means that each char in a string that is evaluated is boxed. This causes unnecessary object allocations when refining values that are not statically known.

This PR fixes this issue by reimplementing these methods they are in the std library, but using an EvalChar argument instead which prevents boxing

@Iltotore Iltotore merged commit 1f255ae into Iltotore:main Jul 9, 2023
1 check passed
@kyri-petrou kyri-petrou deleted the optimize-forall-string branch July 9, 2023 12:23
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.

None yet

2 participants