Needless to say, dot products are directly supported in hardware via the FMA unit.
Add in nd indices and the costs tend to be very small.