Earlier quoted context omitted.
NYC is actually amongst the lowest for Cost of Living adjusted salaries out of all the major tech cities: https://hired.com/state-of-salaries-2017 Rent isn't exactly cheap in NYC
The problem with these numbers is that adjusting an entire salary for cost of living only makes sense for people living paycheck to paycheck. The real question is how much wealth a tech worker can accumulate in each city. If you're saving 10% a year no matter where you live, you're best optimizing for salary and ignoring cost of living.
If you view your job as temporary pain and plan to relocate or retire before starting “real life,” that makes sense. If you’re trying to build a long-term sustainable and fulfilling life that includes a tech job, not so much. Nominal value in a bank account is useless; you need purchasing power.