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

Compress memory allocations for repeated parameters #36

Merged
merged 1 commit into from
Jan 22, 2022

Conversation

keynmol
Copy link
Contributor

@keynmol keynmol commented Jan 22, 2022

Closes #27

  • Reduce the number of calls to alloc when parameter types are repeated.
  • Add tests that instrument local Zone allocations

if returnAsWell then
val block = s"__ptr_${typeIndices(f.returnType)}"
val locationInBlock = usedAllocations(f.returnType)
params ++ Map(-1 -> s"($block + $locationInBlock)")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not proud of this. But it will do for now.

@keynmol keynmol merged commit e43b17e into main Jan 22, 2022
@keynmol keynmol deleted the compress-allocations branch January 22, 2022 18:32
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.

Compressed allocations for parameters of same type
1 participant