Rpm 340 Cyl heads on a 318 !

I overhauled a 318 years back and an older fella advised me against running 340 heads on a basically stock motor with mild cam. he mentioned compression ratio and cc of the chambers etc. I did listen to him and ran stock heads. the engine ran good.