Skip to main content

Timeline for Speed and the MapThread function

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Jun 17, 2015 at 4:47 comment added m_goldberg @Pickett. Yes. "MapCompileLength" -> 100. Not only that, but Map[# + RandomInteger[] &, t] produces a packed array and runs much quicker than MapThread[# + RandomInteger[] &, {t}] which does not. In this case, the Map is being compiled.
Jun 17, 2015 at 0:22 history tweeted twitter.com/#!/StackMma/status/610965735062507521
Jun 16, 2015 at 23:33 comment added C. E. @m_goldberg Strange. And your "MapCompileLength" is set to 100? This is confirmed?
Jun 16, 2015 at 23:16 comment added m_goldberg @Pickett. From the compiled function `f`` I get timings comparable to what he got. The returned array is packed.
Jun 16, 2015 at 23:06 comment added C. E. @m_goldberg I'm used 10.1 on OS X to write my answer. What happens if you run the code in Oleksandr's answer?
Jun 16, 2015 at 22:44 comment added m_goldberg In V10.1 on OS X, I'm getting the same time, ~3.7 sec, with both Map and MapThread. Can anyone confirm this? PackArrayQ returns False for both a and b.
Jun 16, 2015 at 22:38 history edited m_goldberg CC BY-SA 3.0
deleted 31 characters in body
Jun 16, 2015 at 22:31 vote accept CommunityBot
Jun 16, 2015 at 22:28 answer added Oleksandr R. timeline score: 12
Jun 16, 2015 at 22:24 answer added C. E. timeline score: 14
Jun 16, 2015 at 22:18 comment added ciao MapThread unpacks the array... and does more work under the covers (what would you expect re: latter?), and I'd venture compilation (auto) behaves differently.
Jun 16, 2015 at 21:59 history asked user30193 CC BY-SA 3.0