Efficient way to get selected vertices via python (without iterating over the entire mesh)
You have to iterate over the entire mesh since blender isn't storing this data in a separate list internally.

You can use the following line of code to get a list if selected vertices from a bpy.types.Mesh object ('mesh' in the code):

selected_verts = list(filter(lambda v: v.select, mesh.vertices))


or with list comprehension:

selected_verts = [v for v in mesh.vertices if v.select]


However, in most cases, brute force looping through all the vertices of the mesh should be fine.