Position of selected point, edge, face?

thank you my friend for the answer, it helped me a lot. And how can this be optimized for better speed? I do gizmo for, and speed is important to me, if there is a possibility of optimization then I would be grateful