emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vectorization, SIMD


From: Marcus Harnisch
Subject: Re: Vectorization, SIMD
Date: Wed, 23 Apr 2025 16:49:22 +0200
User-agent: Mozilla Thunderbird

Hi Gerd

On 23/04/2025 15.50, Gerd Möllmann wrote:
The "problem" with auto-vectorization is that it fails to optimize loops
in many cases. (The .org file contains a compiler option with which one
can see why it fails. By default, clang says nothing.) For example, it
looks like a break or return in a loop makes it fail. Also a switch,
and I don't know what else.

Almost 15 years ago I wrote an article about ARM NEON vectorization, which may explain some of the issues you are seeing. I would expect other SIMD architectures to be affected in similar ways.

IOW, it's doesn't feel like something that can be relied on, if one
really wants SIMD, especially if some code is compiled by different
compilers or different versions of the same compiler.

The main takeaway was that you can't just flip a compiler switch and expect things to improve significantly. For that, code has to be written with vectorization in mind.

Regards,
Marcus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]