20" will be as close to optimum as you will get in a .223, in theroy the shorter the barrel the stiffer so accuracy should be better and velocity will not suffer enough to notice a difference, standard deviation between rounds will make more difference than barrel length.
Look at the Military, the M16 has been made in many different configurations from pistols to sniper rifles and they have yet to run a barrel longer than 20" that I'm aware of, in fact the SPR had an 18" barrel but the east and west SAM rifles had 20" barrels.