Why does a busy loop often uses 100% of the cpu time while loops that implement complex algorithms开发者_如何学C would use much much less?
I looking for a way how to get rid of busy waiting in host thread in fallowing code (do not copy that code, it only shows an idea of my problem, it has many basic bugs):
I\'m using prettify b开发者_StackOverflowy Google. How to fix?Optimize prettify to make it faster, or make the code you\'re highlighting shorter.Not a proper solution, but I simply disable prettify if