# Hashing tuples of tuples is seemingly very slow

**URL:** <https://discourse.julialang.org/t/hashing-tuples-of-tuples-is-seemingly-very-slow/52223>\
**Category:** Performance\
**Created:** [December 22, 2020, 10:43am UTC](https://discourse.julialang.org/t/hashing-tuples-of-tuples-is-seemingly-very-slow/52223 "2020-12-22T10:43:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [December 22, 2020, 10:52am UTC](https://discourse.julialang.org/t/hashing-tuples-of-tuples-is-seemingly-very-slow/52223/2 "2020-12-22T10:52:32Z")

</div>

Not an answer to your question, but this usage of tuples looks overly complicated. Why not just

```julia
 if (p1, p2) in seen
    return score(p1),1
end        
push!(seen, (p1, p2))

```

It is possible, that `Tuple([Tuple(p1), Tuple(p2)])` construction creates intermediate arrays.

---

_[View the full topic](https://discourse.julialang.org/t/hashing-tuples-of-tuples-is-seemingly-very-slow/52223)._
