By "four days," I assume you mean "three nights." The first and last day are, of course, not full days because of having to get to or from the airport. Three nights in Rome is barely a taste of Rome. Three nights in Florence would give you a better feel for the city (though I don't think there is enough time for day trips). I like both cities very much, but they are quite different. Florence is much more compact, and it's easier to get around and see things. Rome is quite a big city and is best visited in sections. They're both great for walking around, both have incredible art (though Florence has an edge, I think), both have extraordinary architecture (though in Florence you can easily visualize yourself transported back to the Renaissance). I'd put Rome in the lead for restaurants and shopping, though Florence has good examples of both.
Is this your first trip to Italy? Will it be your last?