Skip to content

SIMD level selection #352

Answered by jrouwe
Zylann asked this question in Q&A
Discussion options

You must be logged in to vote

I have the same preference as @Wunkolo.

Switching between versions for every call to Abs or Dot has too much overhead indeed. The alternative is to compile hot spots in the code in multiple versions (e.g. I know that some physics engines do this for the inner loop of the solver). Obviously that limits the benefit to only those portions of the code at the cost of a much more complex code base (basically have to support multiple vector classes, multiple matrix classes etc. or SIMD-ify everything in place which makes things much less readable).

I think you'll get most gain by compiling the executable in multiple flavors and have a 'main' executable whose only job it is to start the right exe…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Zylann
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #350 on December 08, 2022 20:14.