Faster histogram