Manufacturers will significantly accelerate their use of robots in U.S. factories over the next decade as they become cheaper and perform more tasks, constraining payroll growth, according to a study out Tuesday.

The development is expected to dramatically boost productivity and slow the long-standing migration of factories across the globe to take advantage of low-cost labor, says the Boston Consulting Group report.

"Advanced robotics are changing the calculus of manufacturing," says Harold Sirkin, a senior partner at the management consulting firm.

A handful of nations, including the U.S. and China, are poised to reap the biggest benefits of the automation wave.

About 1.2 million additional advanced robots are expected to be deployed in the U.S. by 2025, BCG says. Four industries will lead the shift — computer and electronics products; electrical equipment and appliances; transportation; and machinery — largely because more of their tasks can be automated and they deliver the biggest cost savings.

About 10% of all manufacturing functions are automated, a share that will rise to nearly 25% in a decade as robotic vision sensors and gripping systems improve, BCG says.

Meanwhile, costs are tumbling. The cost to purchase and start up an advanced robotic spot welder has plunged from $182,000 in 2005 to $133,000 in 2014, with the price forecast to drop another 22% by 2025.

That's prodding manufacturers to replace workers. BCG says manufacturers tend to ratchet up their robotics investment when they realize at least a 15% cost savings compared with employing a worker. In electronics manufacturing, it already costs just $4 an hour to use a robot for a routine assembly task vs. $24 for an average worker.

Within two years, the number of advanced industrial robots in the U.S. will begin to grow by 10% a year, up from current annual growth of 2% to 3%, the study says.

The impact on U.S. factory workers is mixed.

Replacing employees with robots is projected to result in a manufacturing workforce that's 22% — or a few million workers — smaller by 2025 than it otherwise would have been. But factory payrolls are still expected to rise because of an expanding economy and the growing tendency of manufacturers to move some production back to the U.S. from overseas — a trend known as reshoring, Sirkin says.

Indeed, the spread of robotics itself should make the U.S. more productive than many other countries, creating more jobs. BCG estimates reshoring and rising exports will add 700,000 to 1.3 million factory jobs in the U.S. by 2020. Many low-skills jobs, however, will be eliminated while higher-skill positions, such as operating and maintaining robots, are expected to grow.

The U.S. is among six countries that the consulting firm characterizes as "fast" adopters of advanced robotics, including China, Canada, Japan, Russia and the United Kingdom. But it says several countries will be even more aggressive — Indonesia, South Korea, Taiwan and Thailand.

The U.S. is expected to be far ahead of a larger number of slower adopters, such as France, Italy, Belgium and Brazil.

The surge in robotics will spawn smaller factories that can easily replicate assembly systems to serve local markets with customized products, the report says.