Knicks president Steve Mills, right, and general manager Scott Perry,...

Knicks president Steve Mills, right, and general manager Scott Perry, left, watch NBA basketball game action in the first half between the Knicks and the Indiana Pacers, Saturday, Dec. 7, 2019. Credit: AP/Mary Altaffer

SAN FRANCISCO — The Knicks departed Portland after another one-sided loss Tuesday night, bound for San Francisco and what in recent years would have been a frightening prospect for a struggling team. But oddly, the league’s dynasty over the last five years and the team that has been the worst in basketball over the last 20 years find themselves battling for the worst record in the NBA.

Their situations are far different, though. The Warriors are recovering from a series of hits that have taken the crown from their head — first the injuries last season to Kevin Durant and Klay Thompson, opening a path for the Toronto Raptors to beat them in the NBA Finals. Then Durant left in free agency, Thompson remains sidelined for much of this season and Stephen Curry also was lost to injury.

So the Warriors entered Wednesday night’s meeting at Chase Center with a 5-20 record, worse than any team in the league except for the Knicks, who brought a 4-20 record, a 10-game losing streak and a far deeper path out of the basement.

The Warriors know that Curry and Thompson will be back and the roster can be bolstered by the arrival of a lottery pick, not far off from what the Spurs did two decades ago when an injury set the stage for the drafting of Tim Duncan.

The Knicks have no such quick fix. The coach, David Fizdale, was already dismissed, and replaced by an interim in placeholder Mike Miller. The roster is up for grabs beginning just days from now when the Knicks can begin trading the seven free agents they signed in the summer as a fallback to a failed pursuit of stars. The Dec. 15 opening of the market for those players allows the Knicks to try to begin finding some return on the flexibility that they sought when they signed six of the players to one-year guarantees — although the one player who did get two years guaranteed, Julius Randle, is also available, according to a league source.

But that brings up the larger question — just who will be making those decisions?

Fizdale’s ouster did not stabilize the situation, instead putting the blame on the next level as team president Steve Mills may have finally run his course with the franchise after 13 years of dysfunction and general manager Scott Perry is not expected to be safe, either. The Knicks are expected to pursue an established basketball man to head up the operation with Toronto’s Masai Ujiri at the top of the list with other names like Oklahoma City’s Sam Presti, Portland’s Neil Olshey and Golden State’s Bob Myers.

“I’ve got great memories, particularly when I was with Chicago and playing in the Garden, hearing the ‘Go NY Go’ song. And I didn’t really like it at the time,” Warriors coach Steve Kerr said. “Looking back, fantastic rivalry. Those teams were tough, physical. They had an identity. Fans fell in love with those teams and the Garden was just electric.

“So I think people recognize that New York is a basketball town, it’s a basketball city. I think most people in the league want the Knicks to be good. I know I do. I think it’s something that’s missing from the league. We need them to have success. They’re a marquee franchise.”

“I’ve been in that situation before in New York with coaching changes, players, staff changing,” Carmelo Anthony said empathetically Tuesday night. “It’s not like you can sit back and try to evaluate anything. You’ve got a game after game after game and guys have to keep playing. It’s a tough situation to be in for those guys. You can’t sit back, can’t sit out, we’ve got to move onto the next game and keep it going and eventually, hopefully something will start kicking in.”

Anthony knows what he speaks, having spent years in some of the most troubled seasons of the Knicks history. He escaped and is now happy to be a part of the Portland Trail Blazers. He can look around the locker room and see star pieces like Damian Lillard and C.J. McCollum to carry the team forward. It is the same thing the Warriors can see. For the Knicks, the future is much murkier.