numpy/numpy — pull request #4548 by juliantaylor (2014-03-25 18:15:06+00:00)
Title: ENH: optimize count_boolean_trues further via unrolling

redoing the computation if the booleans do not not contain 0 or 1 allows
sharing registers for the addition and or operations so we can more
aggressively unroll the loop to save 3 multiplies and shifts. Also it
allows better pipelining of integer operations.
Improvements range from 10%-50% on a range of amd64 cpus.