Finland to Russia on train, the Russian Border security checks you while the train is still in Finland, speeding 200km/h towards Russia. And vice versa when going in the other direction.
That's awesome. Did the crossing a couple of decades ago and that was also the case, though not when 'speeding' but when changing engine at the border, and then it didn't go 200km/h at any point, and that's probably a good thing as there were man-sized gaps between left and right of the iron floating bridge connectors between carriages, but same principle.
Every long distance international train ride I've done has involved handing the conductor your passport if on a sleeper (typically overnight crossing), or someone coming round to check if it's not a sleeper.
Saves a lot of time and hassle.