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

It was either AJ Foyt or Mario Andretti I forget which but had a 318 in his Indy Car with 500 HP. at one time.
Was it a 318 Chrysler LA engine? I only ask because there is always confusion, Chevy made a 302, Buick made a 340 etc. etc.:)