Optimized search speed by preprocessing values on load