Today, dollar for dollar, is the 318 faster than the 340 ???

$3000 ok let’s add it up. Good heads-$1200 average, no port work. But then you got those 7 to 1 pistons another $700 plus you gotta bore it out another $320 now you gotta balance $275 new bearings-rings $300 now a cam, good hyd roller $600, rockers $300, pushrods $80, springs for that big cam $200. Nice intake $350 carb $400 am I missing anything? Wow $4725 kinda out of you budget don’t ya think! You can’t just start adding parts it ALL ties together. No dick swinging 340 guy here, I live in a real world.
Knock $200 off for springs, they might be on the heads already. $4525 now
that'd come down to the desired street engine spec and cost of $3000 easy enough. lots of your quoted parts aren't what the build was about unless as some here would have you believe the 318 needs to be almost a 'race' motor to compete with the 340.