“Gangnam Style” broke YouTube’s view counter

“Gangnam Style” broke YouTube’s view counter

In 2012, the world became unaccountably fascinated with the music video for “Gangnam Style,” South Korean rapper Psy’s surreal dance jam. It featured garishly colored outerwear, speedboats, and a splay-legged dance destined to be performed at weddings and proms the world over. Naturally, it soon became the most watched video in YouTube history, and has since pulled so far ahead of its nearest competitor (as of now, Justin Bieber’s “Baby”) that it’s hard to imagine it ever being surpassed. In fact, “Gangnam Style” recently amassed so many views, YouTube’s view counter broke trying to add them all up, forcing the site to change the way it tallies page visits.

Before the unstoppable popularity of “Gangnam Style” forced its hand, YouTube encoded its view count as a 32-bit integer, meaning that it stored the view numbers as a string of 32 ones and zeros. This gave the site the ability to display view counts as high as 2,147,483,648. In the dark times before the rise of Psy, the company thought no video would ever become popular enough to reach 2.147 billion views—but “Gangnam Style” blew past that upper limit not long ago. Now the site codes its view count as a 64-bit integer, meaning that it can display counts of up to 9,223,372,036,854,775,808. The new number should give viral video artists something to shoot for.

The Washington Post breaks down the math involved in YouTube’s changes, and provides some interesting information on other systems that use 32-bit integers to encode numbers and how the failure to update them could eventually result in a Y2K-like situation. Also, if you somehow haven’t seen the “Gangnam Style” video, you can watch it below. We’ve got a lot more views to log before we break YouTube again.

 
Join the discussion...