As HTML5 was emerging someone posted a HTML 5 demo on hacker news. It put 1 core of my machine to 80%. I wrote an equivalent version in Flash and it used 5%.
All the people writing terrible code in Flash simply started writing terrible code in Java script instead.