capguncowboy is correct on the piston size difference, except for the 1983 serial # ONLY where they were the same size THAT YEAR ONLY
As far as the stroke, the HS40 had a longer stroke for all production years.
Source: Tecumseh Engines Mechanic's Handbook 3-10 HP 4-Cycle Engines printed in 8/1988
Michael