Merge pull request #2320 from WalterBright/binary-switch

do binary lookup for switches