faster and more accurate multilib check