How user space applications can take advantage of CPU features

How user space applications can take advantage of CPU features

Rabin Yasharzadehe rabin at rabin.io
Fri Aug 27 16:48:31 IDT 2021


I'm not much of an expert, but the first thing that comes to mind is the
binary size and speed.
If you only need to implement the code once, and have a single optimized
version, the output will be smaller, and probably a bit faster.





--
Rabin


On Fri, 20 Aug 2021 at 11:54, Lev Olshvang <levonshe at yandex.com> wrote:

> Morning people of the Linux !
>
> Recently I came to a question I do not know the answer to although I am
> with Linux for >20 years,
>
> I am talking about the CPU architecture features likes SIMD, SSE, AES, ...
>  and related gcc CPU architecture switches
> -maes, -msse3, -msse4 -mrdrand are examples of such gcc switches.
>
> I know that OPENSSL queries  CPU features in run-time and then selects
> precompiled functions that takes advantage of a specific feature.
>
> I think the kernel does the same
>
> So I begin to think that such compiler switches are good only to C
> functions which are written in a very specific way to allow gcc to
> recognize graphic or crypto processing patterns and generate the assembly
> in order to utilize those assem;y extensions.
> Otherwise those switches does nothing good.
>
> Please enlighten me on the issue.
>
> Be Healthy,
> Lev
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20210827/6bf8381b/attachment-0001.html>


More information about the Linux-il mailing list