These numbers would be even more exaggerated if San Francisco's city boundaries were drawn similarly to NYC's. A reasonable comparison would be if SF city included every region on the BART (so, all of Oakland and Berkeley and Fremont) and also San Mateo. Or if NYC was just Manhattan (which has a density of 72,033 ppl/sq mi).