Last year's rising stock market boosted public retirement plans, easing pressure on taxpayers who had been paying more each year since the early 2000s to keep the retirements funds from running low on cash.

The benchmark Standard & Poor's index of the stock of 500 large U.S. companies rose 22 percent last year, a fat return on every dollar invested. Some foreign stock markets did even better.

The pension plans didn't do that well, because they don't own just stocks. They own bonds, the best of which keep their value in market crises, despite low returns. Big pension plans pump billions into buyout, hedge, venture capital, and real estate funds, whose managers grow rich on high fees, with mixed results for their investors.

After paying costs and fees:
The $5 billion Philadelphia Board of City Pensions posted calendar-year 2017 returns of 15.4 percent
The $29 billion Pennsylvania State Employees' Retirement System (SERS) was close behind, at 15.1 percent.
The $77 billion New Jersey Division of Investment clocked just under 15 percent.
The $55 billion Pennsylvania Public School Employees' Retirement System (PSERS) returned 12.3 percent, trailing the pack.

Why this matters to your wallet: The more a fund makes from its investments, the less it has to raise from taxpayers. SERS did well enough last year that it was able to reduce the surcharge it collects from the state on public worker pay for next year, to 32 cents on every $1 of state wages, down from 33 cents last year, after steady increases since the early 2000s. (Public workers pay smaller amounts through payroll deductions.)

But PSERS, which was less profitable, had to boost its yearly surcharge once again, to 33.4 cents per dollar, up from 32.6 cents. That charge is split by state taxpayers and school district property owners.

Why do pension returns vary? Philadelphia, last year's top performer, had 30 percent of its $5 billion invested in U.S. stocks, its favorite investment category. SERS bet almost as much — 26 percent. By contrast, PSERS had just 7 percent in U.S. stocks; the plan invested more in foreign stocks, real estate, private-equity funds that buy small companies, junk bonds, and other high-rate debt, and hedge funds — most of which returned less than stocks, even after PSERS paid private investors nearly half a billion dollars in fees (plus additional manager profits).

Why is PSERS stock-shy? Since the 2008-09 financial crisis that briefly cut stock values by nearly half, PSERS has a policy "to reduce equity risk should another downturn occur," spokeswoman Evelyn Williams told me.

By contrast, the Philadelphia plan, after ditching high-fee hedge funds two years ago due to poor performance, has focused more on U.S. stocks, and profited from the bull market, while it lasts.

Gov. Wolf, State Treasurer Joe Torsella, and other Democrats, and some Republicans, have argued that more public money ought to be invested in low-fee stock and bond index funds. Philadelphia and the Pennsylvania funds have in recent years emphasized low-fee indexed investments, managed by state employees or by private managers.

A few of Pennsylvania's county pension funds have gone further, firing most of their outside money managers and buying Vanguard Group index funds.

How'd that go? In Montgomery County, $530 million managed by Vanguard Group (almost 90 percent) and by Oaks-based SEI Corp. posted net returns estimated at 14.7 percent, slightly behind Philadelphia, SERS and PSERS.

In Western Pennsylvania, the $200 million Butler County Employees' Retirement Plan, which fired private managers in 2009-10 and replaced them mostly with 13 different Vanguard Group index funds, reported 13.9 percent returns for the year, beating Pennsylvania teachers but trailing the Philadelphia, Pennsylvania, and New Jersey funds by more than a percentage point.

While Butler and Montgomery Counties are mostly in Vanguard index funds, their other investments diverged. Montco's SEI funds last year outperformed the Vanguard funds, driving total returns higher. (In earlier years, the SEI funds, which include some "alternative investments," trailed the Vanguard returns.)

Butler invested $22 million, close to 20 percent of its total, with a private investment manager called Twin Capital. Twin Capital returns for 2017 trailed the S&P 500 and the Vanguard stock index funds, lowering Butler's returns compared with what stock-index managers would have done.

Why bother with Twin Capital? Plan overseers believe the firm's "low-volatility strategy" of owning big, stable stocks gives the fund "less exposure" to stock market losses, Butler County Controller Benjamin Holland told me. He questioned the wisdom of one-year comparisons: "They are useless! Even three years barely scratches the surface."

So here are longer-term averaged annual returns, with top returns for each category in bold:

PSERS: 3 years (from the start of 2015 through 2017), 6.9 percent; 5 years (2013-17), 7.6 percent; 10-years (2008-17), 4.2 percent
SERS: 3 years, 7.2 percent; 5 years, 8.3 percent; 10 years, 4.1 percent
NJDI: 3 years, 7.4 percent; 5 years, 8.7 percent; 10 years, 5.5 percent (the 10-year data is for fiscal year ended June 30)
Philadelphia: 3 years, 6.2 percent; 5 years, 7.5 percent; 10 years, 5.0 percent
Butler County: 3 years, 7.1 percent; 5 years, 9.2 percent; 10 year, 6.9 percent.
Montgomery County: 3 years, 7.3 percent. (The county went all-index in 2014; I'll add longer-term results when county officials produce them).

All these funds trailed the S&P 500, which yielded 11.4 percent over the last three years, 15.8 percent over the last five years, and 8.5 percent over the last 10 years, which includes the big 2008 drop.

What difference does a percentage point or two make? A lot, when you're a state investing billions for teachers, legislators, prison guards, and social workers.

(An earlier version of this story misidentified the founder of Twin Capital.)