Bit smarter path matcher