In the age of sail oak was greatly preferred to teak on ships of the line as during battle wood slivers would fly and injure crewman. An oak sliver was not a problem as it did not particularly irritate the wound. But a wound with a teak sliver in it would fester and as it was nearly impossible to remove them all, that almost invariably meant amputation if the wound were in a limb or death if the wound was in the trunk.
So...if there is any possibility of your gun getting hit by a cannon ball, you are far better off with anything other than teak.
Otherwise, for a speargun stock that does not by design spends it's life in the water or exposed to the elements on deck, there is no difference between teak or mahogany in terms of decay as both are suitably rot resistant.
Both teak and mahogany have low stiffness and shock resistance, but mahogany is even lower than teak. Mahogoany will take a natural oil finish much better than teak, which is itself already a pretty oily wood. Mahogany is also easier to work with and generally has a nicer grain pattern as teak is usually very straight grained.
Of those two choices, teak is a bit less attractive, harder to work and not as finish freindly, but is slightly more rot resistant, slightly stronger and slightly more shock resistant.
Padauk is grown in central africa and is exceptionally strong as well as exceptionally rot resistant and is dimensionally very stable over time. It is also very pretty wood that finishes well with no need for a stain. The only downside is that it tends to have larger pores than the already pretty coarse teak and mahogany so it requires a bit more sanding and filling for a gloss finish.
Strenght wise, it makes little difference as most stocks are over built already, but if I had a preference I'd go with padauk as it looks very nice and is stronger than the other two. Teak would come in third unless I could see the gun first as it tends to be a bit plain and it does not offer much over mahogany in terms of strenght or rot resistance.
For an application like a rifle stock where sharp and substantial recoil is present, neither teak nor mahogany are good choices due to the low stiffness and shock resistance. Padauk however would work well in this application and would be a good choice for a rifle that was exposed to the elements as the dimensional stability would promote accuracy as it would be less affected by humidity and temperature changes over time.
On a wooden boat, Teak and mahogany are good choices as the rot resistance and high bend strenght are good attributes.