Having two different guns of the same model in different calibers may not be the best comparison unless you had several of each. There's alot of variables that can skew results. Some guns of the same model with same inards can still have a fair difference in efficiency with the same caliber. For example I have three 177 Hw30s with the same spring and seals and everyone is a little different. Simply some barrels and compression tubes work better than others. The best way to do it to use the same exact gun with no other charges but different barrels. Even then some barrels net better or worse than the same part number barrel made a day later.
I'd guess it's likely a smaller caliber would benefit the most from a longer barrel because the smaller cross section would require more length to consume all the swept volume and equalize pressure. Also fwiw a longer stroke with similar volume may work better than one with a larger bore. Using similar hydraulic principles I'd think the larger bore would have more frontal resistance than a smaller bore. The longer stroke smaller piston might push longer against less less resistance, less likely to bounce and be more efficient. Weihrauch came out with the R9 after the R1. They reduced the piston diameter considerably from 30mm to 26mm while increasing the stroke only 5mm. A 177 R9 made 15 fpe when the much bigger and heavier 177 R1 only made 17 fpe.
One reputed downside to long stroke piston guns is they are more hold sensitive. I can't personally verify that but it is logical. This is interesting stuff to me and while much of my opinions are just that, I have swapped barrels and compared efficiency and shot cycles on the same exact gun. I have run my R1 in 177, 20 and 22. I have also run my Hw95 in 177 and 20.
Fun stuff when the only way to know the truth of any of this is to experiment. I dig it.