Berlin? Denser than San Francisco? Huh? I just moved from the former to the latter, and I'm pretty sure that that's not the case, and Wikipedia backs me up (~4,000/km2 vs 7,124/km2).
(Oh, and I do miss Berlin)
Of course, my expectation was that it was more dense than SF, so when I found a source that confirmed it, I was all too willing to trust it. But in retrospect (based on your protest on the matter), the housing itself was quite dense in many areas, but there were many parks and large spaces of open areas between the housing blocks.