U.S. non-farm productivity in the second quarter rose at its fastest pace in six years as companies slashed costs to protect profits, government data showed on Tuesday.

The Labor Department said non-farm productivity rose at a 6.4 percent annual rate, the biggest gain since the third quarter of 2003, from a revised 0.3 percent gain in the first quarter. Productivity for the January-March quarter was previously reported as a 1.6 percent gain.

Analysts polled by Reuters had forecast productivity, which measures the hourly output per worker, rising at a 5.3 percent rate in the second quarter.

It's good because it helps keep inflation low; labor costs are pretty benign, said Scott Brown, chief economist at Raymond James & Associates in St. Petersburg, Florida.

On the other hand it means you can do more with fewer people, he said.

U.S. Treasury debt prices held gains on the data, while stock index futures were little moved.

Hours worked plunged at a 7.6 percent rate in the second quarter, the Labor Department said.

Unit labor costs, a gauge of inflation and profit pressures closely watched by the Federal Reserve, fell 5.8 percent, the biggest decline since the second quarter of 2000. Analysts had expected unit labor costs to fall 2.4 percent in the second quarter. Unit labor costs dropped by a revised 2.7 percent in the January-March quarter.

The government also published revisions to productivity for 2006 through 2008 following adjustments to gross domestic product estimates.

Compensation per hour rose at a 0.2 percent pace and, adjusted for inflation, was down 1.1 percent, while output fell at a 1.7 percent rate in the second quarter.

Compared with the April-June quarter of 2008, non-farm productivity was up 1.8 percent. Unit labor costs fell 0.6 percent year-on-year. Compensation from a year earlier rose 1.3 percent and was up 2.2 percent once adjusted for inflation.

Output, measured on a year-on-year basis, was down 5.6 percent.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)