Timeline for Are there "All" and "Any" functions in Mathematica?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 24, 2012 at 5:21 | comment | added | Dr. belisarius |
This is really "lateral thinking" :). I always use MemberQ and FreeQ the other way around (ie using the "element" as the free var)
|
|
Jan 29, 2012 at 21:53 | comment | added | Leonid Shifrin |
+1. I suspect that the speed advantage comes largely from the fact that in your functions, the clauses have been already evaluated, while And and Or evaluate them only if necessary. If you add the time it took to evaluate those, the difference might be not as large. OTOH, if, for a particular problem, you have some fast vectorized way to obtain the list of True/False, this may indeed be much faster than using And / Or .
|
|
Jan 29, 2012 at 20:30 | history | edited | rm -rf♦ | CC BY-SA 3.0 |
added 239 characters in body
|
Jan 29, 2012 at 7:01 | history | answered | rm -rf♦ | CC BY-SA 3.0 |