File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,15 @@ Determine whether predicate `p` returns true for any elements over the given `di
68
68
If `p` is omitted, test whether any values along the given `dims` are `true`
69
69
(in which case `A` should be `AbstractArray{Bool}`).
70
70
71
+ # Usage Recommendation
72
+ If `A` is reasonably small, `vany` may be faster than `any`; however, as the size
73
+ of `A` grows, the probability of any element returning true inevitably increases
74
+ (it is repeated Bernoulli sampling, thus, even with a very small success probability,
75
+ a large number of tries makes may yield a scenario where the `break` of `any` wins out).
76
+ Consequently, the probability of individual elements being `true` should determine choice --
77
+ if one suspects a reasonable success probability, then `any` may be preferable, depending
78
+ on the size `A`. More testing is needed to determine potential breakpoints.
79
+
71
80
# Additional Notes
72
81
This function suffers from the same issue as `vfindmax` and friends -- reductions
73
82
which include the first dimension with zero masks are not yet supported by LoopVectorization.
You can’t perform that action at this time.
0 commit comments