I'll answer your question with a question...

Is the optimal barrel length for a 22LR and a .22-250 Rem the same? How about the optimal barrel length for a .300 Savage and a .300 RUM? I think you'll find the answer is a resounding no. Much more to optimal barrel length than just bore diameter - one has to factor in case capacity, case efficiency and the pressure curve - just to name a few of the many variables.

Then of course you have to ask yourself, "Optimal for what?" Optimal for velocity? Optimal for accuracy? Optimal for fast handling? Optimal for all of the above?