I'm less of an expert than either of you, but still have a piece of
advice:

If you use CPU specific code, I'd suggest all of the CPU specific code
be encapsulated within one or a very few objects, modules or data
structures with associated functions, so that if the unexpected happens
and you switch hardware, you can simply replace the object, module or
data structure with associated functions.

I think life would be hell if you had to search your whole codebase for
CPU specific code.

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques


Rabin Yasharzadehe said on Fri, 27 Aug 2021 16:48:31 +0300

>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 <levon...@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@cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>  


_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to