I'd say neither.
Yup, that's the easiest.
Cycle computers won't be perfectly accurate as they rely on the assumption that a single revolution of the wheel moves you an exact (to a mm) distance down the road. If that wheel circumference measurement is out by even 1mm then it won't be correct. It also relies upon the wheel circumference measurement to remain constant throughout the ride under all loads (leaning back on a descent with the weight over the rear wheel; or leaning forwards grimping up a steep hill), including as the pressure in the tyre may change. Even turning will slightly change the effective circumference of a tyre.
A 700c x 25mm tyre is approximately 2105mm circumference, but some cycle computers only allow you to set the circumference in cm, and a 25mm tyre is listed as 211cm.
Let's assume a cycle computer set to 211cm reports exactly 300km for a ride. If we'd set it to 210mm it would have reported 298.58km (2dp), and set to 212cm it would have reported 301.42km (2dp).
A 23mm tyre is usually 2097mm circumference, a 25mm tyre is 2105mm. 25.1*2097/2105 = 25.0 miles, so it won't account for a 1.1mile discrepancy.
So now I have set it up correctly on the way home I will see if the two match - like for like.
Don't count on it. I've done my commute hundreds of times with cycle computer and GPS on. The two rarely match up, plus there are reasonable variations (in both) even though I've taken the same route. Even taking just the cyclecomputer readings, my commute in can be anywhere between 11.3km and 11.8km. Same bike. Same route. No correlation with tyre pressure. I don't have to weave about at all on my commute in as the traffic is clear enough all of the way. I'd have to be taking along at ~16
o off straight to add 500meters to a 11.3km commute!
As for GPS, it isn't accurate for distance measurement because the GPS signal is designed for positioning with a stated error. You are within 4 meters of *right here*. Distance measurement is an algorithm applied on top, it's an interpretation of the position/error data.
Take this image, although it's a simplification it should illustrate the point:-
The red splodges represent location fixes and relative errors. The black lines represent 3 different paths through the same splodges. The 3 lines are obviously of different lengths, therefore there's no way for the GPS to know exactly what path was taken and so it cannot be relied upon for a truly accurate figure. The smoothing algorithm applied destroys the ability to guarantee accuracy.
But the algorithm (in some GPSes at least) is smarter than some people think, it does take into account elevation gain, and will (based on certain bounds) assume a straight line has been taken between points where the signal has been lost. Again, this interpretation will reduces the accuracy.
Pick one measuring device and use that, but don't bother comparing two (or more) readings from different devices for an individual ride as there's little point. The more devices you consult the more disparate readings you'll end up seeing.