Pesky filterBy fix

Added 'optimized' for loop in benchmark test.