indeed it is 6 times faster for full masks on a 50k double array (and its yet another place which highly profits from a vectorized count_nonzero)