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

improvement: Use java.lang.StringBuilder for optimized concatation of Strings in NIR CodeGen #3640

Conversation

WojciechMazur
Copy link
Contributor

Previously always String concatation was using String.concat which was in-optimal when used in String interpolators. One of Scala 2 partests was generating way too large files becouse of that: https://github.com/scala/scala/blob/e09bfc87119d5152c131e0c98757d5b9e48a794b/test/files/run/t11665.scala In case of this file size of generated NIR has dropped from over 1MB leading to BufferOverflowException in serializer, to ~150kb, which shall be similar with the size of generated TASTy for this file.

@WojciechMazur WojciechMazur merged commit f2929b1 into scala-native:main Jan 2, 2024
62 checks passed
@WojciechMazur WojciechMazur deleted the improvement/better-string-concat branch January 2, 2024 08:48
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

1 participant