I have a habit of slogging through difficult patches that has, for the most part and with only perhaps two notable exceptions, served me well. However, I want to tell the story of one of these exceptions as a counterpoint to other comments here.
A few years ago I started a job where, within the first week or two, I had serious enough doubts about whether or not it was going to work that I spoke to my manager and said that I wanted to leave (even though I had nothing else lined up). He was really good about it and after we talked I decided to make more of a go of it, but it was the wrong decision and I've always regretted it.
In the end I stayed for 8 months and was miserable and frustrated for the entire time. This was, I think, a contributory factor (though by no means the only factor) to the breakup of a relationship that I valued very deeply, and that I have also always regretted the end of. The end of that relationship was really the final straw: the moment I realised I needed to bail, and that I should have bailed long before.
I still I didn't have anything definite lined up, although I did have three options on the table. In the end I chose one of them and started after taking a month off to recover. Even had I left at the beginning, I don't think I'd have struggled for work though.
Every situation is different, and staying is not always the right thing to do especially not - as was the case in my situation - where the cultural and ways of working gulf is so large. I have no awkward explaining to do about my CV but there are sometimes more important concerns in life.
(I've omitted a lot of specifics because I don't want to name either the organisation involved, or impugn the people either - many of them were great. There was certainly nothing unpleasant going on of the sort we've seen discussed a few times recently on HN. It was simply a case of an unresolvable culture clash. The commute was also a horrible slog - anything between 60 and 90 minutes each way even on a motorcycle, and I hadn't realised how exhausting that amount of riding every day would be.)