optimising cascade matching selector speed