Optimizations to neighbor list construction