And note that pre-machined-rifling firearms only truly came into their own when the socket bayonet was developed, which allowed the firearm to function as a pointy stick
Sightly different relationship applied here, though.
First, the socket bayonet precedes massed rifled firearms by over a century: it was officially adopted by the French Army in 1703, by the Dutch and English/British Armies a few years earlier, and by virtually every army in Europe by 1708 (Russia's Tula Arsenal Model 1708 musket was, I believe, the last hold-out). It was adopted at virtually the same time that the flintlock smoothbore
Fusil was adopted by the same armies for the bulk of their infantry.
This was a Singularity Change in tactical combat in Europe. The old Matchlock musket did not fit a bayonet, unless you counted the plug bayonet which was stuffed into the barrel and made the weapon no longer a firearm for the rest of the battle (they had to be pried back out of the barrel with tools). That meant that the matchlock musketeer's only melee weapon was a short, cheap sword he sometimes carried but was not trained to use, and a 15 - 20 pound clumsy club which was the non-firing musket. In addition, since the matchlock required a lit, smoldering match to fire, about half the movements in the manual of arms for loading the weapon involved keeping the lit match from setting fire to yourself, your ammunition, or the man and ammunition to either side of you in the formation. That meant that 'musket' formations had to be very open: 4 - 5 feet per man in all directions to keep the lit matches away from everyone, and the rate of fire was, at best, about 1 shot per minute.
The flintlock and socket bayonet meant several things changed All At Once:
No lit matches. The Manual of Arms suddenly went from 40 + movements to a little over 20, the speed of fire went from 1 to 2 - 3 shots per minutes, and the fusiliers could be shoulder to shoulder. The firepower on a 100 meter front of musketmen suddenly went from 75 shots per minute to 600 - 900 shots per minute, and the formation now presented a solid hedge of bayonet points to any attack, since the second or third rank could 'close up' to apply their weapons to the front as well.
The manufacture of flintlock firing mechanisms in quantity, by no coincidence, comes right after the invention by Hooke and Huygens of the hairspring mechanism that made convenient pocket watches possible, in 1675 CE. That also required the metallurgical consistency for spring-loaded flintlock firing mechanisms and the intricate assembly techniques for the firing, striker and pan combinations.