Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the compress functionality for Neon so that it has feature parity with the other SIMD backends.
Unfortunately, as suggested in the comment in the source, it seems to be no faster than the scalar implementation.
However, I figured it would at least be worth creating the PR in case someone can figure out a way to improve it.
I did try a few different techniques for implementing various parts but none of them seemed to help, or they were sometimes slower. I'm no Neon expert either so mostly this was just a naive attempt to see what the end result would be.
EDIT: I should note that I only tested this on an M3 Max MacBook Pro so it might have different performance on another platform if someone can give it a try.