as Tim said, SubArrays work considerably better on 0.4.0-dev therefore f1 >> f2 ~ f3
@time f1(a, w); elapsed time: 0.880487448 seconds (613990480 bytes allocated, 69.56% gc time) @time f2(a, w); elapsed time: 0.045515195 seconds (35976080 bytes allocated) @time f3(a, w); elapsed time: 0.034428182 seconds (11840 bytes allocated) On Thursday, January 8, 2015 1:20:53 AM UTC+1, Greg Plowman wrote: > > Thanks Tomas, > > What I really meant was relative performance of f1 vs f2 vs f3 on Julia > v0.4. > > My tests on V0.3.4, showed f3 much faster (x6) than f2 which in turn is > much (x4) faster than f1. > > My point being, if understand your timings correctly, f3 should be faster > than f2 on Julia v0.4 > > - Greg >
