Hot answers tagged performance-tuning
Regarding CountTrue: There is generally no need for the empty Module. You can use CompoundExpression if you need several operations in sequence. Here even that is not necessary. There is no need to count all appearances of True in an expression to determine if one is present: instead use MemberQ. That gives us: CountTrue[list_] := MemberQ[list, True] ...
Only top voted, non community-wiki answers of a minimum length are eligible