If the --vectorize compiler flag is thrown (implied by --fast), the Chapel compiler will emit vectorization hints to the backend compiler, though the effects will vary based on the target compiler.
反汇编一看在 ARM64 上连 neon 都没用上,x86_64 也没看到用 xmm ymm (如果仔細看,还是有一点的,但明显不如 C 编译出来的用的多),实际上做并行化就是把 forall loop 编译成多线程,看着是把 CPU 十多个核跑满了,结果原来还不如单线程 SIMD。
显然是 chapel 生成的 IR 不滿足 llvm auto vectorization 的要求。都这样了,还有啥性能好分析的,结论就是 chapel 的 vectorization 好几年了还是只存在于 ppt 上。
我黑的就是那些卖点是所谓编译到 CUDA,OpenMP 的,用 LLVM 当后端的并行编程语言,实际上没有任何性能优势,没了后面的 API 纯 CPU 一比遮羞布就给扯了,就算是用上了 CUDA, OMP,实际用上了几成也难说。