Skip to main content
7 events
when toggle format what by license comment
Sep 4, 2022 at 20:43 comment added ExpressionCoder Thanks, wonderful answer. It's a bit of a climb to assimilate Mathematica, but loving every step of it. Another insight gained, thanks again.
Sep 4, 2022 at 20:42 vote accept ExpressionCoder
Sep 4, 2022 at 20:14 comment added eyorble Listable is going to be the key property to avoiding needing to call the function extra times based on the length of the list, so it should always help with this, yes. Vectorization can refer to a bit more based on how the list actually gets handled at the lower levels, but that's something for Compile if you're going that far. I would expect that Listable has most of the gains, but without a less toy example it's probably harder to say.
Sep 4, 2022 at 19:55 comment added ExpressionCoder Am I correct in assuming that vectorizable is indicated by "Listable" in Mathematica? That would make sense and help me to identify the cases where we can assume speedy application of an operation to the whole list.
Sep 4, 2022 at 19:25 comment added eyorble In this context, vectorized means that the function can automatically map itself over the whole list, as in Mod[list, 7] automatically applying itself to each member of list automatically, and preferably also be evaluated using vectorized functions. To me, Pick isn't the prime example of the vectorization here, it's just a really fast way to pick from one list using another as a selector.
Sep 4, 2022 at 19:09 comment added ExpressionCoder Thanks eyorble. Can you clarify what "write the test such that it can be vectorized over the whole range" means? I am not sure how to interpret vectorized in this context. I looked up Pick in the language documentation, so have some idea of what vectorized could mean, but it is not sharp enough for me to apply it in other contexts.
Sep 4, 2022 at 18:35 history answered eyorble CC BY-SA 4.0