title: Get the index of an element in a queryset
body: <p>I have a QuerySet, let's call it <code>qs</code>, which is ordered by some attribute which is irrelevant to this problem. Then I have an object, let's call it <code>obj</code>.  Now I'd like to know at what index <code>obj</code> has in <code>qs</code>, as <em>efficiently</em> as possible. I know that I could use <code>.index()</code> from Python or possibly loop through <code>qs</code> comparing each object to <code>obj</code>, but what is the best way to go about doing this? I'm looking for high performance and that's my only criteria.</p>
  
  <p>Using Python 2.6.2 with Django 1.0.2 on Windows.</p>