matching optimizations for LinkedList