Best data I've seen regards velocity is that you'll lose about 20 fps per 1" barrel length. Using a standard 26-28" bbl to start.
But, you can make up for that lose with penetrative qualities of a next-size larger shot - assuming you have same-same pattern density = # of pellets on-target.
It's a trade-off - always.
And. Choke, depending on what type shot/cup/buffering you use, will also affect your pattern. Density is really what you're always looking for - a nice, tight pattern of whatever shot you're using - with suitable penetrative qualities.
#7-1/2s for distant doves? = you'd want that to pattern well at 40+ yards.
#4s for turkeys? you want that to pattern at the longest range you can get - pretty tight.
Best bet is to pattern for the choke you have, for the shot you're using (you must pattern for best bets) in the barrel you use.
Funny, in a way, that rifle-folk go on-&-on about how accurate their loads are (& I am one of them, BTW) & will never consider the effects of load/choke with a shotgun .....
Really, you should.
My best-fave all 'round shooter is a 21" double bead mod-choked Rem 870 Express using 2-3/4" 1-1/4 oz #4s - smokes most everything toot-sweet.
YMMV, but IMNSHO, it is The Best Standard Loading.
'Nother thing is "pointability."
I find that the 21"ers point quicker & "better" than most others. 18s point quicker & don't give up anything though.
The longer barrels tend to allow for a better follow through - something I've never been prone to, being more of a (stupid & worthless rifle-shooter = I have zip for a follow-through) - again, YMMV.
Acheive target, point, slap trigger, watch it crumble.
(I do have a long way to go towards better shotguning .....