optimized deepMatch and emit