You don't need to call cosine to compute cosine similarity - most of the time, a normalized dot product is sufficient.
Needless to say, dot products are directly supported in hardware via the FMA unit.
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.