# Performance problem of count?

**URL:** <https://discourse.julialang.org/t/performance-problem-of-count/16873>\
**Category:** Performance\
**Created:** [October 27, 2018, 7:54pm UTC](https://discourse.julialang.org/t/performance-problem-of-count/16873 "2018-10-27T19:54:36Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Liso](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@Liso](https://discourse.julialang.org/u/Liso)\
**Post date:** [October 28, 2018, 12:22pm UTC](https://discourse.julialang.org/t/performance-problem-of-count/16873/12 "2018-10-28T12:22:22Z")

</div>

> [@Sukera](#):
>
> I really don’t see the problem here - to me, the loop is much more clear and explicit about what’s going on than the generator expression. It does precisely what you expect without any hidden allocation, whereas the generator by lieu of existing already allocates.

Wouldn’t be usefult to propose then in “benchmark tips” to not use generators?

In other words - could we find examples where using generators could be useful and performant?

---

_[View the full topic](https://discourse.julialang.org/t/performance-problem-of-count/16873)._
