The tests above are for double precision floating point numbers. The results for single precision are below.

Dot Product (single precision):

       ndReduce vectorized = 2 ms, 200 μs
                  ndReduce = 14 ms, 543 μs
numeric.dotProduct, arrays = 7 ms, 208 μs
numeric.dotProduct, slices = 14 ms, 414 μs
              zip & reduce = 43 ms, 657 μs

Euclidean Distance (single precisoin):

                ndReduce vectorized = 2 ms, 226 μs
                           ndReduce = 14 ms, 661 μs
  numeric.euclideanDistance, arrays = 14 ms, 597 μs
  numeric.euclideanDistance, slices = 14 ms, 581 μs
                       zip & reduce = 46 ms, 759 μs

Reply via email to