Given exact same parts, compression ratios,. Ams etc. The 340 will win. And if you're building a motor anyhow you might as well start with the better of the two.
Been beating larger motors all my life. Given the same compression, heads, cam, fuel, and exhaust, too close to call. Not worth thinking about. Build what you have and enjoy.