The tragic gas explosion in Harlem will likely revive complaints that America is a pothole nation with falling-down bridges, and that we desperately need to boost government infrastructure spending. The reality is more complex.

The first thing to note is that government infrastructure spending in the United States is at about the same level relative to the size of our economy as it is in other high-income nations.

Another thing is that the quality of much U.S. infrastructure has been steadily improving. Federal data show that of the roughly 600,000 bridges in the nation, the share that are “structurally deficient” plunged from 22 percent in 1992 to just 11 percent by 2012.

The surface quality of our highways is also improving. A study by Federal Reserve economists using “International Roughness Index” data found that “since the mid-1990s, our nation’s interstate highways have become indisputably smoother and less deteriorated.”

With the Harlem disaster, people are pointing to Consolidated Edison’s 127-year-old cast iron pipes as the obvious problem. They may be, but we should not just assume that old infrastructure represents a failure.

Con Ed has an ongoing program to replace its old pipes, but we can’t repipe and repave the entire nation every year. Instead, there is an optimum replacement rate for all infrastructure. Consider that it would be too costly for you to buy a new car every year, so you balance the new-car price with the rising maintenance costs on your old one.

As for cast iron, note that the famous Iron Bridge in Shropshire, England is 235 years old and still standing.

For governments, finding the optimum replacement rate is difficult because they operate outside of markets. So the big issue with government infrastructure spending is not so much the level of it but the efficiency of it. In my experience, much of it gets misallocated by politics, and projects are often mismanaged and go over budget.

The good news is that four-fifths of all U.S. infrastructure spending is private, including everything from energy pipelines, to cell phone towers, to factories. Companies will aim for the optimum level of investment if they can earn a decent rate of return. In this regard, policymakers can help by removing tax and regulatory barriers that companies such as Con Ed face in pursuing their upgrades that benefit all of us.