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

Specialize heap small and large chunk implementations #4366

Merged
merged 1 commit into from
Jul 16, 2023

Conversation

dipinhora
Copy link
Contributor

Prior to this commit, the heap chunk_t was generic for both small and large chunks taking up more space than required for either one.

This commit specializes the small and large chunk structures by using pointer tagging on the chunk->m field to keep track of the chunk type and large chunk slot/shallow/finaliser and the small chunk sizeclass. This should in theory improve performance as now the large_chunk_t is 32 bytes and small_chunk_t is 36 bytes on 64 bit platforms (while chunk_t was previously 44 bytes.

There are no logic changes other than whatever was required to support the specialization.

Prior to this commit, the heap `chunk_t` was generic for both small
and large chunks taking up more space than required for either one.

This commit specializes the small and large chunk structures by
using pointer tagging on the `chunk->m` field to keep track of
the chunk type and large chunk slot/shallow/finaliser and the small
chunk sizeclass. This should in theory improve performance as now
the `large_chunk_t` is 32 bytes and `small_chunk_t` is 36 bytes on
64 bit platforms (while `chunk_t` was previously 44 bytes.

There are no logic changes other than whatever was required to
support the specialization.
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jul 16, 2023
@SeanTAllen SeanTAllen merged commit 4109a91 into ponylang:main Jul 16, 2023
19 checks passed
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Jul 16, 2023
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