Sort for all metrics together

Sorting for each metric has a big impact in performance. Sorting even
just once for all metrics still hurts performance. Maybe sorting can
be removed completely?