Star Wars fighters don't operate anywhere near the speed of light, and operate at minimal range without getting hit by those turrets. The only reason they should miss is because they are manually targetted by people with shitty reflexes. Current real world military tech is vastly more advanced in computer targetting than Star Wars tech is.
Actually, given a small, fast a target and a large, presumably slow-tracking turret - keeping in mind that the speed/precision inverse relation to turret tracking probably holds tru even in technofantasy settins - going in really, really close is a GREAT idea: it makes it really, really bloody hard for the turret to track you.
Without taking into account power dissipation over distance due to imperfect optics - which one can assume to be neglibible when you have warp and artificial gravity, since you have both the power and mean to use gravity lenses - the optimal distance to shoot at something with a projoectile or beam turret in space is equal to how far you can target.
After all, we're talking about manned craft, and no matter how many magictechnical thingamjigs you pack in them, you still can't evade a focused light beam or pulse at the distances SW and ST craft fight at, because of the limitation of human reflex speed.
Anyway, the whole discussion is moot and purely for fun, you might as be asking "In a game of 4-dimensional chess, who would win, a platypus or a badger?"