code: function getCompare(_, ctx) {
    var k = 'c:' + _.$compare + '_' + _.$order,
        c = array(_.$compare).map(function(_) {
          return (_ && _.$tupleid) ? tupleid : _;
        });
    return ctx.fn[k] || (ctx.fn[k] = compare(c, _.$order));
  }
docs: Resolve a comparator function reference.