core: use a sorted arraylist for partial completions

With a sorted list, the partial completion is about 50x faster
(like other completions).