I wanted to check out the lag on World Generation. Spawned in a brand new world. Did /locate to find the nearest village. Clicked to teleport and when it loaded in it jostled my player back and forth in the stone blocks for about 30 seconds like it was trying to figure out where to put me. But instead of being in the village like I would expect to be it put me in a cave system right below the village deep underground. The village was in a Taiga Biome.
/tp x ~ z
always keeps the y coordinate at which you executed the command.