# OrderedCollections vs DataStructures

**URL:** <https://discourse.julialang.org/t/orderedcollections-vs-datastructures/57658>\
**Category:** General Usage\
**Created:** [March 21, 2021, 2:52pm UTC](https://discourse.julialang.org/t/orderedcollections-vs-datastructures/57658 "2021-03-21T14:52:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HugoTrentesaux](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hugotrentesaux/32/12583_2.png) [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Post date:** [March 21, 2021, 2:52pm UTC](https://discourse.julialang.org/t/orderedcollections-vs-datastructures/57658/1 "2021-03-21T14:52:52Z")

</div>

In [OrderedCollections](https://github.com/JuliaCollections/OrderedCollections.jl) page, it says it was split from [DataStructures](https://github.com/JuliaCollections/DataStructures.jl) without giving more detail. Which one should I use in which case?

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [March 22, 2021, 1:17am UTC](https://discourse.julialang.org/t/orderedcollections-vs-datastructures/57658/2 "2021-03-22T01:17:49Z")

</div>

If you need OrderedDict or OrderedSet, use OrderedCollections.jl, which contains those.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [March 22, 2021, 9:53am UTC](https://discourse.julialang.org/t/orderedcollections-vs-datastructures/57658/3 "2021-03-22T09:53:47Z")

</div>

Agreed. These days `DataStructures` simply reexports `OrderedDict` and `OrderedSet` from `OrderedCollections` so functionally there’s no difference.

If you are using more functionality from `DataStructures` you may as well get everything from that package.

However, if you use only `OrderedDict` and/or `OrderedSet`, getting them from `OrderedCollections` has the advantage that it’s a smaller and more stable dependency, which helps a lot with keeping up to date with dependency compatibility.
