Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-16 14:56:46



Reply to topic  [ 3 posts ] 
The -t/--tune option in buildlinux.sh 
Author Message

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
I was wandering through the buildlinux.sh. I noticed it will accept a 'tune' arg which enables a couple of compile options, if the CPU supports them. My rig's CPU now supports the options that are being grep'd ('avx' and 'cx16'). I have done some minimal 'testing' (i.e. is frame rate better/worse, CPU utilization, etc) with both the precompiled version from sldev.free.fr and my own build using --tune. I haven't noticed much of a difference but I'm pretty sure I wouldn't know what to check. I have tried to discern what those options provide and it seems like they would be things that would give benefit. Would there be any recommendation to build myself with the --tune arg, if my CPU supports the options, or is it not really of much benefit?


2017-07-05 00:57:55
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
If you build the viewer for yourself, then there can only be some benefit in using the --tune option. However the benefit is very minor and most likely unnoticeable in most situations.

Basically, and for Core-i5/7 CPUs, the compiler will favour AVX operations over SSE2 ones in the generated code, but the viewer does not spend its time performing such operations either...

For other (older) CPUs the gain could theoretically be slightly higher, since the compiler will be invoked with the -mtune=native option, which might also take into account some instructions and data alignment rules, that may lead to faster execution on some processors; but here again, the gain will be quite minor (don't expect anything better than 1% or so in speed gain).

It will be interesting to see what happens with newer CPUs (e.g. the Ryzen), once new gcc/llvm-clang versions will take them into account, and provided you compile the viewer with one such new compiler version...

PS: I'll change the buildlinux.sh to use only "-mtune=native" (instead of "-mtune=corei7-avx -mavx" for Core-i5/7), since that option already includes all proper tunes for both existing (with current compiler versions) and future (with future compiler versions) CPUs.


2017-07-05 09:21:52
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
Thanks for the explanation. Your indication that the benefit would be slight, aligns with my observations. I guess it's then just a matter of preference whether I wish to build myself or not. :-)


2017-07-05 13:08:58
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.