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

Vectorize DataCost #6953

Merged
merged 4 commits into from
Apr 26, 2024
Merged

Vectorize DataCost #6953

merged 4 commits into from
Apr 26, 2024

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented Apr 26, 2024

Changes

  • Cacluate data costs 32 bytes at a time rather than 1

Types of changes

What types of changes does your code introduce?

  • Optimization

Testing

Requires testing

  • No

Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

Maybe have some general method of counting 0's in span? Maybe we already have one?

@benaadams benaadams merged commit a0302b8 into master Apr 26, 2024
67 checks passed
@benaadams benaadams deleted the datacost branch April 26, 2024 12:05
Comment on lines +1018 to +1024
for (int i = 0; i < data.Length; i++)
{
if (data[i] == 0)
{
totalZeros++;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

btw can we optimize it here a bit more on ulongs?

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.

2 participants