Let's do some numbers. According to glassdoor an average salary for a software engineer in San Fransisco is 110k USD. A single bedroom apartment in SF goes for 3500/mo on average.
In Toronto, according to payscale the average software developer job is 65k CAD, though let's also consider 80k because it's not hard to get that at a decent place if you have several years of experience. A single bedroom apartment right in downtown can be had for 1,600/mo CAD. Assuming you are living where you work and not doing something like living in Toronto earning a US salary, your buying power with left over money is likely to be similar.
SF, after taxes (21%) gives you 86,900. Taking out rent, you are left with 44,900. Toronto at 65k is taxes about 25%, so you are left with 48,601 and after rent you have 29,401. But, if you get 80k, then you are taxes 26% and after rent get 39,461 left over which starts looking a lot more comparable.