Replies: 1 comment 2 replies
-
This is a trivial example and any good compiler will be able to auto-vectorize this. ISPC shines when you need to write big kernels that are potentially calling other sub functions. It guarantees that the code will be vectorized thanks to its SPMD syntax, while any other compiler will fail miserably. Also, ISPC is available on all major platforms, which means that the generated code will be consistent and the performance truly portable. ISPC is the best way to write vectorized code for CPUs and nothing comes close. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I compared the performance ISPC vs LLVM Clang (portable version from zig via
pip install ziglang
)vs
ISPC shows only 10% boost.
main loop asm
ISPC:
Clang:
as we can see clang vectorizes the func very well.
So should I migrate to ISPC which gives only a small performance gain, with programs needing to be rewritten in a different form, and with the chance that the library will be discontinued in the future and will not continue to receive updates for new processors?
Beta Was this translation helpful? Give feedback.
All reactions