I did the math for Toronto(which is more expensive than Montreal).
For a typical software engineer, taxes take away 25% of gross pay in Ontario while it's over 30% in California and New York. Cost of living is much less(by 30-40% if you rent) in Toronto compared to Cali/New York. Of course, you will also earn 40% less in USD. So it about evens out
From what I've experienced, this is rapidly becoming untrue - CoL in Toronto has become very high, friends are paying comparable to what I paid in NYC but salaries are definitely lower. They're paying in CAD what I paid in USD, but are earning 20-30% less. Food is also more expensive (particularly eating out), on the whole, than NYC.
Most new construction apartments are quite small, and the older, larger ones command a significant premium. You can move out of the downtown core (to North York, Scarborough, etc) but then you're committed to a long commute on the slow TTC or sitting in traffic on the 401.
MTL is much cheaper, but salaries also lag even further.
According to numbeo[1] which crowdsources data, groceries and restaurants are 20% cheaper(adjusted for currency) in Toronto, but of course the salary is more than 20% lower, which might explain your experience. The real kicker is the rent, while Toronto rent is definitely increasing, it is nowhere close to New York City levels, and most sources do say you have to pay 50% more for an equivalent apartment in NYC.
Also according to my calculations from the data on numbeo, the equivalent of (pre-tax) $135,000 USD in NYC is $110,000 CAD in Toronto. It is of course easier to get 135k in NYC than 110k in Toronto, but the difference isn't nearly as big as the CAD/USD differences and wage gap makes it seem. And if you can get a job in the Waterloo-Kitchenner area, CoL of course plummets. Freelancing for clients in the US or working remotely also has great advantages.
I'm talking about the average for the whole salary, not the marginal rate for the highest bracket. It looks like you have to earn $250,000 CAD to get a 40% average, but that's a very high salary by Canadian standards.
For a typical software engineer, taxes take away 25% of gross pay in Ontario while it's over 30% in California and New York. Cost of living is much less(by 30-40% if you rent) in Toronto compared to Cali/New York. Of course, you will also earn 40% less in USD. So it about evens out