performance optimization for the list implementations.