With 22 LR barrel lenghts over 18 inches or so actually slow the bullet down, you will loose muzzle velocity. But it have shown for many manufacturers and gun smiths that it's beneficial for accuracy, hence why many precision 22's are around 20 - 22 inches.
Lots more to it, but that's what I've...