# Faster way to find all bit arrays of weight n

**URL:** <https://discourse.julialang.org/t/faster-way-to-find-all-bit-arrays-of-weight-n/113658>\
**Category:** Performance\
**Created:** [April 30, 2024, 3:31pm UTC](https://discourse.julialang.org/t/faster-way-to-find-all-bit-arrays-of-weight-n/113658 "2024-04-30T15:31:31Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [April 30, 2024, 8:05pm UTC](https://discourse.julialang.org/t/faster-way-to-find-all-bit-arrays-of-weight-n/113658/7 "2024-04-30T20:05:14Z")

</div>

There’s also this thread on computing the next integer value with the same number of ones set: [Computing the preimage of count\_ones](https://discourse.julialang.org/t/computing-the-preimage-of-count-ones/104838).

---

_[View the full topic](https://discourse.julialang.org/t/faster-way-to-find-all-bit-arrays-of-weight-n/113658)._
