# Finding low frequency numbers in a large collection

**URL:** https://discourse.julialang.org/t/finding-low-frequency-numbers-in-a-large-collection/93556
**Category:** Performance
**Created:** [January 26, 2023, 6:50am UTC](https://discourse.julialang.org/t/finding-low-frequency-numbers-in-a-large-collection/93556 "2023-01-26T06:50:08Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![CodeGodz](https://avatars.discourse-cdn.com/v4/letter/c/aeb1de/32.png) [@CodeGodz](https://discourse.julialang.org/u/CodeGodz)
#### Post date: [January 26, 2023, 8:13am UTC](https://discourse.julialang.org/t/finding-low-frequency-numbers-in-a-large-collection/93556/5 "2023-01-26T08:13:24Z")

</div>

The point of that code, using atomic, was to show _how slow_ it is not to enhance performance when threaded… see the [benchmark output](https://github.com/tkf/ParallelIncrements.jl/blob/master/README.md):

> Atomic operation is 10x slower… benchmark increments a single location in an array 1000 times

Quite some discussion like [this](https://discourse.julialang.org/t/manual-reduction-much-faster-than-atomic-add-with-threads/60721) and [this](https://github.com/JuliaLang/julia/issues/41843), that atomic adds are very slow

---

_[View the full topic](https://discourse.julialang.org/t/finding-low-frequency-numbers-in-a-large-collection/93556)._
