For completeness: I can reproduce this behavior for m1. m2 returns fine after a little over four times the time it took for 100 vectors.
// T On Wednesday, August 10, 2016 at 11:34:08 AM UTC+2, Tamas Papp wrote: > > I was benchmarking code for calculating means of vectors, eg > > v = [rand(100) for i in 1:100] > > m1(v) = map(mean, zip(v...)) > m2(v) = mapslices(mean, hcat(v...), 2) > > @elapsed m1(v) > @elapsed m2(v) > > m2 is faster, but for 1000 vectors, > > v = [rand(100) for i in 1:1000] > > m1 with zip takes "forever" (CPU keeps running at 100%, I interrupted > after a 10 minutes). Is this supposed to happen, or should I report it > as a bug? > > Tamas >
