Optimized matching