Which is more important in determining author order: time spent or results obtained? This is in the field of life sciences, i.e. a field in which the order of authors is not determined randomly but reflects author contributions (whatever that means); in other words, being first author is better than being second, which is better than third etc - except for the very last authors, who are generally the lab heads.

We're publishing a paper and two teammates have a disagreement on the order in which their names should be listed. We basically explored several strategies that were at the time all quite reasonable, so there was really no way to determine if one made more sense than another. We found that testing strategies one by one rigorously (one person per hypothesis to validate/debunk) was the most productive way to move forward. Our paper describes several mechanisms that we demonstrated could work for a certain problem.

Team member A tested several hypotheses, including one of the four that made it to the final paper.

Team member B tested more hypotheses (they were working on the project full-time, as opposed to A), and demonstrated that they were not scalable / valid strategies for our purposes. Interesting, useful for us, but not paper-worthy. 

Each one of them has a pretty strong claim for having a better authorship position:

Teammate A designed and 100% tested one of the strategies that did work and that we chose to report in the paper, so their contribution is quite obvious. On the other hand teammate B spent more time on the project, debunked working hypotheses (not publishable but it had to be done at some point) and helped with the validation of other designs that worked - a contribution of 40-50% of the work on two different parts of the project. 

Obviously results include a part of chance (picking the correct hypothesis/molecule/group/dataset), but time spent on the project is not a perfect metric either (working smart matters more than working long hours).

Without asking for a definite answer, how do you generally weight the importance of "what the paper shows in the end" vs. "the important but not article-worthy preliminary work"? In other words, how do you measure "contribution"? I would like to come up with a rational and objective way to determine who contributed more significantly - at least by the journal's standards.
In my field, this would clearly be shared (first) authorship.

As for the exact positions, in my experience one of A and B would also have been spending a lot of time as a de facto project lead that determines the course of the project and does most of the writing. In fact, in my field this would almost always be B, unless A somehow has the capabilities of effectively leading multiple projects and delegating vast proportions of the work in those projects.

I don't place a lot of value on happening to find the right solution for a problem. The way you describe this, it seems almost stochastic: A proposed four solutions and got lucky, B proposed more solutions but didn't get lucky. Obviously the situation and value of contributions changes if B could not have found the solution, but A (possibly because of greater experience) could have.

Two other considerations: first, exact position on a paper can have very different values for different people. A first first authorship can be absolutely vital for scientists who are rounding off their PhD or postdoc, whereas scientists who aren't rounding off could also obtain this in a next project. Second, maybe there are ways to even out the author contributions? One way would be to do another project together and flip author positions for that one. Another way would be that the person who doesn't get author precedence can present the work at conferences for the first year. And maybe there are better ideas that someone in your lab can come up with.