Its dependent on the gun. But....typcially, when you shorten the slide/barrel length, you shorten the amount of room for the recoil impulse/slide movement also.
You also have less room/thus a shorter recoil spring..it all adds up to a shorter recoil stroke............The momentum IS the same so typically a heavier weight recoil spring is in order.
My fullsize CZ 9mm's use a 16-18 lb recoil spring, the same gun in the Compact uses an 18-20 lb recoil spring.......same momentum in a shorter space needs a stronger spring to stop compared to the longer movement offered by the fullsize gun.
Shoot well.