Fast entropy calculation