# How would I check for unique values across many arrays without for loops?

**URL:** <https://discourse.julialang.org/t/how-would-i-check-for-unique-values-across-many-arrays-without-for-loops/40341>\
**Category:** General Usage\
**Created:** [May 28, 2020, 2:14pm UTC](https://discourse.julialang.org/t/how-would-i-check-for-unique-values-across-many-arrays-without-for-loops/40341 "2020-05-28T14:14:29Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [June 2, 2020, 4:29pm UTC](https://discourse.julialang.org/t/how-would-i-check-for-unique-values-across-many-arrays-without-for-loops/40341/6 "2020-06-02T16:29:51Z")

</div>

> [@rdeits](#):
>
> there is absolutely _no reason_ to avoid loops in Julia unless doing so helps you write clearer or easier to understand code

Is this not a bit of an exaggeration? I think I saw several comments/issues where people where getting better performance with vectorized code, mostly due to how particular packages are implemented. I think one case was with Distributions.jl, maybe in relation with Turing.jl, but I can’t find it again. Another came up recently here: [Speed of vectorized vs for-loops using Zygote - #3 by ChrisRackauckas](https://discourse.julialang.org/t/speed-of-vectorized-vs-for-loops-using-zygote/40556/3) .

---

_[View the full topic](https://discourse.julialang.org/t/how-would-i-check-for-unique-values-across-many-arrays-without-for-loops/40341)._
