# Column iterator

**URL:** <https://discourse.julialang.org/t/column-iterator/14967>\
**Category:** General Usage\
**Created:** [September 14, 2018, 5:18pm UTC](https://discourse.julialang.org/t/column-iterator/14967 "2018-09-14T17:18:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Post date:** [September 14, 2018, 7:46pm UTC](https://discourse.julialang.org/t/column-iterator/14967/5 "2018-09-14T19:46:21Z")

</div>

Compare with

```julia

function f7(yy, x) 
    for i in 1:size(yy, 2)
        y = view(yy, :, i)
        @inbounds y .= x
    end
end

@btime f7($yy, $y)

```

```julia
 169.822 μs (10000 allocations: 468.75 KiB)

```

---

_[View the full topic](https://discourse.julialang.org/t/column-iterator/14967)._
