So what's your ending preference, the movie or the book?
The movie. Maybe Raymond Chandler's contributions jazzed it up for me? Plus Cain's Phyllis gains with Barbara Stanwyck's portrayal IMO; I didn't find Walter's motivation in the novel quite as credible as it is in the movie. I liked the book, but I'd rank the film as even better.
Actually, I felt his motivation in the novel more satisfying than in the book, but as for the ending, I prefer the movie, and while both endings would have worked in the book, I can't see the book ending working on film.