It is generally accepted that barrel length, in and of itself, is not relevent to accuracy.
However, a little reading of
Secrets of the Houston Warehouse and you'll see that they found 21 3/4 to be the most accurate length.
The caveat being that those shooters would consider 1/4" 100 yard groups to be horrendously bad, completely unacceptable, while many "normal" folks may never, one time, shoot a 1/4" group and most guns are completely incapable of it.
In terms of velocity, there are diminishing returns beyond a certain length, impossible to say exactly without at least running the calculations through QuickLoad. Suffice it to say that somewhere around 24" is about normal and even that is well into diminishing returns.
I'm in the earliest stages of building a deer rifle and my barrel will be 21 3/4 because, well, it can't hurt and it might help. I'm giving up little velocity but a fair amount of weight by dropping from 26 or even 24 inches.
As always, your opinions and mileage may vary.