Improve conditional table lookup speed