Which is more efficient, raycast, get distance to x, or using collision?

Bumping question!