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

Uses the MacroEvaluator's argument indices IntArray as-is instead of allocating a new List. #1035

Merged

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Jan 16, 2025

Description of changes:
IntArray.toList() was showing up fairly significantly in allocation profiles. Simply changing to IntArray.asList() gets most of the same benefit. The proposed solution is slightly better and enables removal of an existing TODO in the code. More significant improvements are likely to be achieved via pooling.

Speed: 250 ms/op -> 250 ms/op (0%)
Allocation: 201 KB/op -> 194 KB/op (-3.5%)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tgregg tgregg requested a review from popematt January 16, 2025 22:48
@tgregg tgregg merged commit 905dfbb into ion-11-encoding Jan 16, 2025
17 checks passed
@tgregg tgregg deleted the ion-11-encoding-optimize-arg-indices-int-array branch January 16, 2025 23:08
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.

3 participants