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

Examples in README.md are not equivalent #44

Open
Lastique opened this issue Nov 21, 2023 · 0 comments
Open

Examples in README.md are not equivalent #44

Lastique opened this issue Nov 21, 2023 · 0 comments

Comments

@Lastique
Copy link

The examples given in the front page (README.md) are not equivalent. That is, the examples showing native_simd and compiler intrinsics are not vectorization of the original scalar_product function because:

  • Their Vec3D array contains a different number of elements. In the original code, there are 3 floats in the array, and the modified examples use vector types for elements, where the vector type itself is a number of floats. The vectorized functions should operate on the same input data as the original. Yes, that means you should probably show how your library helps dealing with tail data that doesn't fit in a native vector.
  • The effect of the scalar_product function in the modified examples is different, as it does not produce a single float that is the sum of products of the input arrays. The vectorized code is missing the final reduction step.

I understand that you are trying to be concise in your front page examples, but I still believe the examples should provide user with a realistic comparison of the two ways to implement the same functionality. Without this equivalence, the comparison is pointless, as you are comparing apples to oranges.

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

No branches or pull requests

1 participant