go-mgo/mgo — pull request #34 by mjs (2014-10-07 08:04:01+00:00)
Title: Improved document key sorting and support for struct document ids

Support sorting of struct based document ids

---

Introduce sortableDocKey

Precompute the nature and sort value for each doc key once instead of
each time Less is called. This trades slight additional complexity and
memory usage for sort speed. This also paves the way for sorting of
struct document keys.

---

Removed unnecessary resort of document keys