Anything past 22 inches for the .308 won't even be in the conversation for best based on the data.
If you define "best" by highest velocity, then I'd agree.
Other folks use other criteria, and some use a combination of criteria to determine what they consider "best".
Since we're in the semi auto forum, the usual barrel lengths for semi auto rifles ought to be the primary topic. That would basically be 16, 18, 20, and 22" tubes as far as I can see.
Semi auto .308 sporting rifles, like the Rem series are usually in either 22" or carbine 18" (18.5") length. Military style semis like the M1A, FAL, H&K 91, and ARs are available in other lengths as well.
OP did not state the rifle he was considering, only the use he would put it to.
I've had a bit of experience with all the common semis having 18" or longer, but not the 16" ones.
At my stage of life, climbing rifle armed in and out of vehicles, house clearing and CQB situations are simply not options. Hunting in thick cover still is, but while I have hunted with battle rifles, I choose not to pack more weight and length than needed into thick woods. My first deer rifle was a Remington 600 bolt action .308 with an 18.5" barrel. That's still my preferred size and weight class for the deer woods. I'd choose that over any semi auto.
If I were "hunting" something that would hunt me back, (or vise versa) my choice would be different. I am very fond of my "rack grade" M1A. Fits me well, has a good trigger, and there is a strong nostalgia bond for me. Also its as or more accurate than I am in field conditions and dead nuts reliable. Have had all the others, and eventually let them go. The M1A is the one I kept, and will keep. Can't buy or sell one in my state these days (until they get that stupid law repealed) but I can, and will keep mine, until they close the lid on my box.