Skip to content

Two micro-optimisations #330

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

Merged
merged 2 commits into from
Aug 8, 2024
Merged

Two micro-optimisations #330

merged 2 commits into from
Aug 8, 2024

Conversation

dcoutts
Copy link
Collaborator

@dcoutts dcoutts commented Aug 8, 2024

Saving allocations and indirections in the lookup code path.

dcoutts added 2 commits August 8, 2024 15:05
They're overloaded on MonadPrim m => and are called in the hot path of
lookup, where using the overloaded version was generating a lot of
allocations.

The alloc per key in the benchIndexSearches goes from 1369 to 88.9.
Strict fields are not auomatically unpacked when they're bigger than a
word. So things like Vector etc are not unpacked automagically.
@dcoutts dcoutts force-pushed the dcoutts/arena-specialise branch from 1101e33 to 74ba6c7 Compare August 8, 2024 14:05
@dcoutts dcoutts enabled auto-merge August 8, 2024 14:05
@dcoutts dcoutts added this pull request to the merge queue Aug 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 8, 2024
@jorisdral jorisdral added this pull request to the merge queue Aug 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 8, 2024
@jorisdral jorisdral added this pull request to the merge queue Aug 8, 2024
Merged via the queue into main with commit 6be948a Aug 8, 2024
17 checks passed
@jorisdral jorisdral deleted the dcoutts/arena-specialise branch August 8, 2024 22:44
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