What is the fastest procedure for counting elements smaller than 0.5 in a large list?
For example let
list=RandomReal[1, 10000000];
For a number of elements less than 0.5
Length[Select[list, # < 0.5 &] ] // Timing
{6.20313, 4996170}
Count[list, _?(# < 0.5 &)] // Timing
{7.75, 4996170}
Total[Table[Boole[list[[k]] < 0.5] // N, {k, 1, Length[list]}]] // Timing
{3.5625, 4.99617*10^6}
Total[(Sign[list - 0.5] + 1)/2] // Timing
{3.625, 5003830}
But for example
list.list // Timing
{0., 3.33561*10^6}
So the length of the list is not so big, rather the procedures used are slow. What's the faster way?