Resolved compilation error due to mutable qualifier.
Added perf test.
Optimized case when filter function calls once.