According to this WaPo post, the US is nowhere even close to the top...

When two Swedish economists set out to examine whether economic freedom made people any more or less racist, they knew how they would gauge economic freedom, but they needed to find a way to measure a country’s level of racial tolerance. So they turned to something called the World Values Survey, which has been measuring global attitudes and opinions for decades.
Among the dozens of questions that World Values asks, the Swedish economists found one that, they believe, could be a pretty good indicator of tolerance for other races. The survey asked respondents in more than 80 different countries to identify kinds of people they would not want as neighbors. Some respondents, picking from a list, chose “people of a different race.” The more frequently that people in a given country say they don’t want neighbors from other races, the economists reasoned, the less racially tolerant you could call that society.

Racism rocks hard in "India, Jordan, Bangladesh and Hong Kong." Indeed, over 70 percent of Hong Kongers do not want to live next to a person of a different race. Maybe cosmopolitanism and density are not a given.