In the "olden days" of twenty or thirty years ago, most folks tended to take the first route. All publishers had slush piles. A book would "make it over the transom" and then that writer would find an agent. That's harder to do now, when a lot of publishers have stopped accepting unagented manuscripts. But, while it's true that there are more agents than editors, it's also true that agents aren't exactly pushovers, either. Some writers still try the first route—sell that book! Find an editor!
But if you write spec fic, who can you send it to? I did a recent quick survey of the big name houses in science fiction and fantasy. Part of the problem is that houses have consolidated, so there are fewer of them now. Here's what I found, based only on what's posted on the web. I put links to their submission guidelines because they're all different. I included everyone I knew who published science fiction and fantasy, counting paranormal romance as fantasy:
Science fiction and fantasy publishers for which you need an agent
Del Rey Books, Bantam, Dell, all parts of Random House
Harper Collins, includes Eos
Simon & Schuster (not sure they publish any science fiction or fantasy except for YA; Good news! see comment from Charlie below.)
Publishers who accept a full or partial m.s. without an agent
DAW Books -- they want the whole thing
Baen Books — send the whole thing; they prefer electronic submissions on their site
Tor Books, send a partial
Ace and Roc, two parts of Penguin Group, send a partial
Something in between
Avon Romance — they want a query first and then they might ask for a partial
A final thought.... if you send your book to every house on the "Don't need an agent" list and they all say no, and then you get an agent, you have to tell the agent the book has already been shopped around to those places.