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

Performance inspector #48

Closed
ralfbiedert opened this issue Jul 15, 2018 · 3 comments
Closed

Performance inspector #48

ralfbiedert opened this issue Jul 15, 2018 · 3 comments

Comments

@ralfbiedert
Copy link
Contributor

Faster should have a way to hint at performance issues.

From a user's point of view it is hard to predict whether SIMD intrinsics are issued, or a fallback implementation is used. Ideally there should be a method, macro, compiler flag, ... to enable performance metrics or warnings.

In the most simple form, each fallback implementation could call something like fallback!, which in turn could be enabled or disabled with a compile feature. That macro could then emit warnings (maybe even with file names and line numbers).

As a user I could then either change my code, file an issue, or implement the missing intrinsic myself.

@AdamNiederer
Copy link
Owner

Sounds like a good way to get some drive-by commits from people who know of, say, an SSE2 polyfill for an SSE4 intrinsic, too. I think printing to stderr once per function if a certain feature is enabled is a pretty good way to go about this.

@ralfbiedert
Copy link
Contributor Author

SIMD never looked this good:

test tests::kernel_i16 ... ok
🚄 faster is using HARDWARE acceleration here (src/arch/x86/intrin/sum.rs:168).
🚄 faster is using HARDWARE acceleration here (src/arch/x86/intrin/upcast.rs:249).
test tests::kernel_i32 ... ok
⛔ faster is using SOFTWARE emulation here (src/arch/x86/intrin/sum.rs:259).
test tests::kernel_i64 ... ok
test tests::kernel_i8 ... ok
⛔ faster is using SOFTWARE emulation here (src/arch/x86/intrin/sum.rs:259).
🚄 faster is using HARDWARE acceleration here (src/arch/x86/intrin/sum.rs:104).
test tests::kernel_u32 ... ok
test tests::kernel_u16 ... ok
test tests::kernel_u8 ... ok
test tests::kernel_u64 ... ok

@AdamNiederer
Copy link
Owner

Resolved by #52. Thanks a lot!

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

2 participants