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

Fancy new algorithm on stable SIMD and a bunch of other stuff #44

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

Veedrac
Copy link
Collaborator

@Veedrac Veedrac commented Aug 26, 2018

Sigh. I'm not a fan of Rust's fragmentation around SIMD. Let's see, we have

  1. An AVX2 implementation, using Intel's intrinsics,
  2. An SSE2 implementation, using Intel's intrinsics,
  3. A generic version, using packed_simd,
  4. A fake-integer-SIMD version, using bit magic,
  5. A trivial fallback.

Why? Well,

  1. the AVX2 implementation exists because it's the fastest,
  2. the SSE2 implementation exists because the generic version requires nightly,
  3. the generic version exists because other architectures exist, plus it's strictly better than the SSE2 version, plus it works with no_std,
  4. the fake-integer-SIMD version exists for the same reason the generic one does, though it isn't as good as any of the above, but doesn't require nightly,
  5. the fallback version exists for short vectors and for naive_ operations.

If the generic version supported stable, we could throw out 2. and 4., and I could make 1. a simple extension, like it used to be. It might make sense to just throw some of this out now for maintainability reasons; this clearly isn't a sane way of doing things.

Good luck reviewing this ¬_¬. Did I mention it's all unsafe?

@llogiq
Copy link
Owner

llogiq commented Aug 27, 2018

What's with the appveyor build?

@@ -0,0 +1,161 @@
use std::arch::x86_64::{
Copy link

Choose a reason for hiding this comment

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

You have to import x86 module for i686 systems.

@Veedrac
Copy link
Collaborator Author

Veedrac commented Aug 27, 2018

@llogiq I #[cfg]'d things incorrectly, plus what @mati865 said. I should see if setting up a cross-compiler allows me to test this locally.

@Veedrac
Copy link
Collaborator Author

Veedrac commented Oct 23, 2018

Fix is up. Sorry for the wait (^_^;).

@llogiq llogiq merged commit 87c3b23 into llogiq:master Oct 24, 2018
@llogiq
Copy link
Owner

llogiq commented Oct 24, 2018

Thanks! I'll prepare a new release shortly.

@Veedrac
Copy link
Collaborator Author

Veedrac commented Oct 24, 2018

I'll need to update the README since the flags have changed; give me 24h and I'll have a PR. Might also make sense to have a limited beta or somesuch since there's a lot of fresh unsafe code.

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