TORONTO — If coming close and doing a fair number of good things for a fair amount is good enough for you and the Rangers, then this was a fairly decent night against the loaded Maple Leafs.

The Blueshirts turned in a committed effort and were able to muddy the track and negate the opposition’s edge in speed while keeping its top-end skill in check much of the way, but not well enough and not long enough to leave here with a point or two.

“Overall we played a good game against an elite team, but we still wound up beating ourselves to a degree by making some of the mistakes we had preached against,” Kevin Hayes said after the Blueshirts’ 5-3, empty-net aided defeat. “We allowed them to stretch us a little bit too much. In the end, when you’re playing a team like that, you can’t give them the opportunities we did.”

Grading on a curve gets old, even if the Rangers are young in so many key spots. They tend to crack at the most inopportune times, Toronto’s four-goal third period (including the clinching empty-netter) marking the fourth time in the last seven games the Blueshirts have allowed three goals or more in a period. The Leafs also got a quick-strike pair within the first 5:26 of the third after two periods of stodgy and deliberate 1-1 hockey.

“We did a lot of good things but you can’t make the type of mistakes we did against a team like this and expect to win,” coach David Quinn said. “We didn’t give up many odd-man rushes, but when we did, they scored. We made mistakes on a coverage off a faceoff that we haven’t made all year. They’re a team that’s going to take advantage of your mistakes.”

The Rangers have won two of their past nine (2-4-3) and three of their past 12 (3-6-3) heading into Sunday’s Garden match against the Flyers in the final game before the holiday recess. It is also one of those games that will pop up the rest of the way in which a defeat might prove more beneficial in the long-term building process than a victory. The 21st-overall Blueshirts, you should know, are just three points ahead of 27th-overall Philadelphia.

That, though, is not the players’ concern. They are living day-to-day, not on a three-to-five year plan. So defeats such as this hurt, even as they are part of the evolutionary process.

“[The Maple Leafs] didn’t stop playing. They flip the puck and come with speed,” forward Chris Kreider said. “They’ve got lots of skill and were able to capitalize on our mistakes. Plays I could have made, one at the end with the net empty where I could have gotten it back-door to Mika [Zibanejad], those are small details that could have made a difference.

“What you want to do is take any good and learn from the bad.”

Alex Georgiev, who made his second consecutive start, yielded one on a Patrick Marleau mid-air deflection at 2:58 of the first but the young goaltender did not crumble. Neither did the Rangers, who yielded little in terms of time and space through most of the first 40 minutes that ended in a 1-1 deadlock after Neal Pionk — who had a dynamic game — drilled a slap shot by Frederik Andersson at 15:00 of the second.

That culminated a period in which the Rangers killed off a four-minute Toronto power play in style and went with a five-forward power-play unit of their own for the first time. With second-line power-play point man Tony DeAngelo a healthy scratch, Pionk was the only defenseman of the 10 skaters the Blueshirts used on their two man-advantages.

“I did it a couple of times at BU,” said Quinn, who went with a pair of different five-forward permutations. “But really, I just wanted to get our five best players out there.”

Neither permutation scored, though the Blueshirts did maintain an offensive-zone presence. But the Maple Leafs took control in the third, with John Tavares elevating his game to become the difference-maker, winning the faceoff against Brett Howden before his deflection was slammed in by Andreas Johnsson at 1:37.

Morgan Reilly then took advantage of horrid D-zone coverage for a weak-side goal under four minutes later and then, after Kevin Hayes’s rebound finished Filip Chytil’s nifty dash to the net to make it 3-2 at 6:34, Mitch Marner beat the coverage back and buried Tavares’ feed at 12:53. Again the Blueshirts came within one when Kreider tipped in Marc Staal’s blast at 16:19, but the empty-netter sealed it and sent the Rangers home for their lottery-bound showdown with the Flyers.