# Strange behavior with Void?

**URL:** <https://discourse.julialang.org/t/strange-behavior-with-void/2480>\
**Category:** General Usage\
**Created:** [March 5, 2017, 10:14pm UTC](https://discourse.julialang.org/t/strange-behavior-with-void/2480 "2017-03-05T22:14:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [March 5, 2017, 10:14pm UTC](https://discourse.julialang.org/t/strange-behavior-with-void/2480/1 "2017-03-05T22:14:46Z")

</div>

Consider the following:

```julia
> a = Vector{Void}(100_000_000);
> b = Set(a); # note: this takes > 1 second
> b.dict
Dict{Void,Void} with 1 entry:
  nothing => nothing

> whos()
...
a 0 bytes 100000000-element Array{Void,1}
b 131072 KB Set{Void}

```

What’s going on with the size of `b`?

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [March 5, 2017, 10:47pm UTC](https://discourse.julialang.org/t/strange-behavior-with-void/2480/2 "2017-03-05T22:47:03Z")

</div>

The size hint in `union!` increases the size of the slot numbers in the Dict.

---

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [March 5, 2017, 10:51pm UTC](https://discourse.julialang.org/t/strange-behavior-with-void/2480/3 "2017-03-05T22:51:42Z")

</div>

That’s what I was thinking, but perhaps it makes sense to have a specialized case for `Set`s of `Void` because the set size can by definition only contain one element?
