A longer barrel produces higher FPS from the same spring/nozzle/hop set up.
Accuracy is extremely dependent on the cone of possible trajectories that the BB can follow when it leaves the muzzle. We know from the way that TK Hop Twist barrels work that something which affects the width of this cone is the airflow that passes around the BB in the barrel. The rifled TK barrel causes that airflow to average out the effect of the times the BB bounces against the inside of the barrel however gravity will always make more of them act in the vertical plane than horizontal, which means that, on average, there will be a higher percentage of air passing the BB on either side than above and below, which must thus narrow the cone on the horizontal plane.
A longer barrel will allow more time for this effect to take place. I have no doubt that some short guns can both outrange and shoot more accurately than some long, for eg my AKS-74U now shoots further and more accurately with a barrel that is about 40mm shorter than before, but made from chromed brass rather than brass, and 6.02mm wide (also I upgraded the spring to M105 from M100). However my G36KV fired further and more accurately with just a barrel swap to 455mm x 6.04mm from 385-or whatever the stock one was. I can also say with certainty that a stock SRC G36KV is more accurate than a stock SRC G36C.
Also, I don't know what spring sniper rifles you are comparing your AEG to, Zyras, or at what range, but at 60m I'd bet my left bollock on my SVD to outperform your G3 and at 80m+ there just wouldn't be any competition.