1 Reply Latest reply on Jan 7, 2010 9:21 AM by genaganna

    Advantages/Disadvantages of float4 vs. float8

    awkehwe82397rfaowUI

      Are there any performance advantages of using a float8 over a float4? Say I have five float values, should I use a float8 to do vector operations on those five values or split them up into two float4 vectors?

      Are there any instances when one should not use float vectors to perform math operations on a number of floats?

        • Advantages/Disadvantages of float4 vs. float8
          genaganna

           

          Originally posted by: awkehwe82397rfaowUI Are there any performance advantages of using a float8 over a float4? Say I have five float values, should I use a float8 to do vector operations on those five values or split them up into two float4 vectors?

          There is a performance improvement if hardware has 8 float vector units.  Otherwise it is purely based on compiler optimizations.

           

          Are there any instances when one should not use float vectors to perform math operations on a number of floats?

           

          To know exactly you need to know instruction set of corresponding hardware.

          Take any math operations and look corresponding instruction(or group of instructions) available in CAL IL or SSE3.x