Ther's no short answer to this, but here goes....

A standard .22LR bullet reaches it's maximum velocity at around 14-16in of barrel. Any further time spent int he barrel actually reduces bullet velocity through friction. So if you want maximum muzzle velocity, a 14-16in barrel is the way to go.

However maximum velocity and maximum accuracy aren't neccessarily the same thing. Most Match rifles like the Anschutz 54, or Walther KK have a longer barrel, ususally 25-27in. Some older match rifles like the BSA Internationals and Valmet Finnish Lions went up to 29in. These rifles shoot pretty well. However these rifles were designed to be shot with aperture sights, which work better if the foresight is a good distance away (see the recent topic on bloop tubes). Also the long barrel on match rifles balances better.

Anschutz, Walther, and Feinwerkbau all tried shorter 18-20in barrels with a long bloop tube (false muzzle extension) to invrease sight radius. These often shot very well, but not overwhelmingly better than a standard 25-27in barrel that everyone went over to a short barrel.

If we look at the Bench Rest crowd, most custom rifles seem to have barrels around 23-25in. Some BR thinkers have suggested that it's better for the bullet to spend some time in the barrel after reaching peak velocity, as this evens out any velocity variations.

OK, so will it hurt your barrel to cut it down to 14-16in? The only way to tell is to do so. Are you really looking for BR accuracy? There are many reports on this forum of successful barrel chops. The important thing is to get someone really competent to cut and recrown the barrel.

On an aside it's not really recommended for Anschutz match rifles. Anschutz make their barrels by a different process to CZ, and deliberately add a choke to the muzzle. Sometimes the barrel can be shortened with no ill effects, and sometimes a barrel never shoots well after shortening.

Tim