Having lived in both for a few years each I can definitely say that SF is cheaper, at least on a per-sqft basis.
You also earn twice as much in SF (plus the equity lottery).
That all said: SF certainly ain't no London. I'd still pick London any day of the week.