Sorted lists iteration 5 (fix the slowdown)

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>