# Normal vs broadcasted slice assignment

**URL:** <https://discourse.julialang.org/t/normal-vs-broadcasted-slice-assignment/110288>\
**Category:** General Usage\
**Created:** [February 16, 2024, 10:24am UTC](https://discourse.julialang.org/t/normal-vs-broadcasted-slice-assignment/110288 "2024-02-16T10:24:02Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [February 16, 2024, 8:10pm UTC](https://discourse.julialang.org/t/normal-vs-broadcasted-slice-assignment/110288/6 "2024-02-16T20:10:26Z")

</div>

In

> [@Why is copying using a loop is much slower than \`copy\` for large arrays?](https://discourse.julialang.org/t/why-is-copying-using-a-loop-is-much-slower-than-copy-for-large-arrays/90633/2):
>
> A possible explaination : The builtin-in copy simply calls a builtin function jl\_array\_copy, which in turn calls a builtin array constructor and memcpy function. Your simple implementation cannot beat C’s highly optimized memcpy (memcpy is really smart and it can sometimes even utilize special feature offered by operating system). The case of small array may be related to alignment problem or overhead in memcpy, since you copy directly and LLVM knows more information, some logic in memcpy can b…

Chris Elrod had suggested that the differences arise from non-temporal stores, and that LoopVectorization provides a Julia equivalent.

---

_[View the full topic](https://discourse.julialang.org/t/normal-vs-broadcasted-slice-assignment/110288)._
